Skip to content

Commit

Permalink
Merge pull request #91 from launchdarkly/eb/ch29193/dependencies
Browse files Browse the repository at this point in the history
make some dependencies less strict and remove some unused ones
  • Loading branch information
eli-darkly authored Jan 5, 2019
2 parents 4ad6a9b + 3b5b08e commit 97bb302
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ruby-docker-template: &ruby-docker-template
gem install jruby-openssl; # required by bundler, no effect on Ruby MRI
fi
- run: ruby -v
- run: gem install bundler
- run: gem install bundler -v "~> 1.7"
- run: bundle install
- run: mkdir ./rspec
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
if [[ $i == jruby* ]]; then
gem install jruby-openssl; # required by bundler, no effect on Ruby MRI
fi
gem install bundler;
gem install bundler -v "~> 1.7";
bundle install;
mv Gemfile.lock "Gemfile.lock.$i"
done
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
*.a
mkmf.log
*.gem
Gemfile.lock
.DS_Store
88 changes: 88 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
PATH
remote: .
specs:
ldclient-rb (5.4.1)
concurrent-ruby (~> 1.0)
faraday (>= 0.9, < 2)
faraday-http-cache (>= 1.3.0, < 3)
http_tools (~> 0.4.5)
json (>= 1.8, < 3)
net-http-persistent (~> 2.9)
semantic (~> 1.6)
socketry (~> 0.5.1)

GEM
remote: https://rubygems.org/
specs:
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
concurrent-ruby (1.1.4)
connection_pool (2.2.1)
diff-lcs (1.3)
docile (1.1.5)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.0.0)
faraday (~> 0.8)
ffi (1.9.25)
ffi (1.9.25-java)
hitimes (1.3.0)
hitimes (1.3.0-java)
http_tools (0.4.5)
json (1.8.6)
json (1.8.6-java)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
rake (10.5.0)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redis (3.3.5)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
ruby_dep (1.5.0)
semantic (1.6.1)
simplecov (0.15.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
socketry (0.5.1)
hitimes (~> 1.2)
timecop (0.9.1)

PLATFORMS
java
ruby

DEPENDENCIES
bundler (~> 1.7)
codeclimate-test-reporter (~> 0)
connection_pool (>= 2.1.2)
ldclient-rb!
listen (~> 3.0)
rake (~> 10.0)
redis (~> 3.3.5)
rspec (~> 3.2)
rspec_junit_formatter (~> 0.3.0)
timecop (~> 0.9.1)

BUNDLED WITH
1.17.3
6 changes: 2 additions & 4 deletions ldclient-rb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "json", [">= 1.8", "< 3"]
spec.add_runtime_dependency "faraday", [">= 0.9", "< 2"]
spec.add_runtime_dependency "faraday-http-cache", [">= 1.3.0", "< 3"]
spec.add_runtime_dependency "semantic", "~> 1.6.0"
spec.add_runtime_dependency "thread_safe", "~> 0.3"
spec.add_runtime_dependency "semantic", "~> 1.6"
spec.add_runtime_dependency "net-http-persistent", "~> 2.9"
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0.4"
spec.add_runtime_dependency "hashdiff", "~> 0.2"
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
spec.add_runtime_dependency "http_tools", '~> 0.4.5'
spec.add_runtime_dependency "socketry", "~> 0.5.1"
end
12 changes: 6 additions & 6 deletions lib/ldclient-rb/cache_store.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
require "thread_safe"
require "concurrent/map"

module LaunchDarkly
# A thread-safe in-memory store suitable for use
# with the Faraday caching HTTP client. Uses the
# Threadsafe gem as the underlying cache.
#
# A thread-safe in-memory store suitable for use with the Faraday caching HTTP client. Uses the
# concurrent-ruby gem's Map as the underlying cache.
#
# @see https://github.com/plataformatec/faraday-http-cache
# @see https://github.com/ruby-concurrency/thread_safe
# @see https://github.com/ruby-concurrency
#
class ThreadSafeMemoryStore
#
# Default constructor
#
# @return [ThreadSafeMemoryStore] a new store
def initialize
@cache = ThreadSafe::Cache.new
@cache = Concurrent::Map.new
end

#
Expand Down
1 change: 0 additions & 1 deletion lib/ldclient-rb/redis_store.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require "concurrent/atomics"
require "json"
require "thread_safe"

module LaunchDarkly
#
Expand Down

0 comments on commit 97bb302

Please sign in to comment.