flipper-redis 0.6.2 → 0.7.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f87e5b265f72a14e8ad14af144ec4a6587fb4520
4
+ data.tar.gz: 6dce4778d6ba7119839dde4ab9c58a6f7664abfb
5
+ SHA512:
6
+ metadata.gz: 954c2d9187dc094ec4d8580797a389e8b27c126a7c6db86421747ec3b175c9d5e1fe5de50393f648551b8acbccd02b9bb6455c4fa4e7565c4af797332132ad24
7
+ data.tar.gz: d23a80b8726e69e9b0c8a59e33ef6f50ad27f67d26f398547e1ba603a9cf0a18d674ddaf6ba0c129dcc5a2f0b3dd418a1cc9074251e0d57c4683396de5c0afd4
data/README.md CHANGED
@@ -92,6 +92,24 @@ pp adapter.get(flipper[:stats])
92
92
  # :percentage_of_random=>"15"}
93
93
  ```
94
94
 
95
+ ## `script/bootstrap`
96
+
97
+ This script will get all the dependencies ready so you can start hacking.
98
+
99
+ ```
100
+ # to learn more about script/bootstrap
101
+ script/bootstrap help
102
+ ```
103
+
104
+ ## `script/test`
105
+
106
+ For your convenience, there is a script to run the tests. It will also perform `script/bootstrap`, which bundles and all that jazz.
107
+
108
+ ```
109
+ # to learn more about script test
110
+ script/test help
111
+ ```
112
+
95
113
  ## Contributing
96
114
 
97
115
  1. Fork it
data/Rakefile CHANGED
@@ -1,6 +1,4 @@
1
1
  #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
3
-
4
2
  require 'rspec/core/rake_task'
5
3
  RSpec::Core::RakeTask.new
6
4
 
@@ -15,6 +15,6 @@ Gem::Specification.new do |gem|
15
15
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
 
18
- gem.add_dependency 'flipper', '~> 0.6.0'
18
+ gem.add_dependency 'flipper', '~> 0.7.0.beta1'
19
19
  gem.add_dependency 'redis', '>= 2.2', '< 4.0.0'
20
20
  end
@@ -1,7 +1,7 @@
1
1
  module Flipper
2
2
  module Adapters
3
3
  class Redis
4
- VERSION = "0.6.2"
4
+ VERSION = "0.7.0.beta1"
5
5
  end
6
6
  end
7
7
  end
data/script/bootstrap ADDED
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ #/ Usage: bootstrap [bundle options]
3
+ #/
4
+ #/ Bundle install the dependencies.
5
+ #/
6
+ #/ Examples:
7
+ #/
8
+ #/ bootstrap
9
+ #/ bootstrap --local
10
+ #/
11
+
12
+ set -e
13
+ cd $(dirname "$0")/..
14
+
15
+ [ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && {
16
+ grep '^#/' <"$0"| cut -c4-
17
+ exit 0
18
+ }
19
+
20
+ rm -rf .bundle/{binstubs,config}
21
+ bundle install --binstubs .bundle/binstubs --path .bundle --quiet "$@"
data/script/release ADDED
@@ -0,0 +1,42 @@
1
+ #!/bin/sh
2
+ #/ Usage: release
3
+ #/
4
+ #/ Tag the version in the repo and push the gem.
5
+ #/
6
+
7
+ set -e
8
+ cd $(dirname "$0")/..
9
+
10
+ [ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && {
11
+ grep '^#/' <"$0"| cut -c4-
12
+ exit 0
13
+ }
14
+
15
+ gem_name=flipper-redis
16
+
17
+ # Build a new gem archive.
18
+ rm -rf $gem_name-*.gem
19
+ gem build -q $gem_name.gemspec
20
+
21
+ # Make sure we're on the master branch.
22
+ (git branch | grep -q '* master') || {
23
+ echo "Only release from the master branch."
24
+ exit 1
25
+ }
26
+
27
+ # Figure out what version we're releasing.
28
+ tag=v`ls $gem_name-*.gem | sed "s/^$gem_name-\(.*\)\.gem$/\1/"`
29
+
30
+ echo "Releasing $tag"
31
+
32
+ # Make sure we haven't released this version before.
33
+ git fetch -t origin
34
+
35
+ (git tag -l | grep -q "$tag") && {
36
+ echo "Whoops, there's already a '${tag}' tag."
37
+ exit 1
38
+ }
39
+
40
+ # Tag it and bag it.
41
+ gem push $gem_name-*.gem && git tag "$tag" &&
42
+ git push origin master && git push origin "$tag"
data/script/test ADDED
@@ -0,0 +1,23 @@
1
+ #!/bin/sh
2
+ #/ Usage: test [individual test file]
3
+ #/
4
+ #/ Bootstrap and run all tests or an individual test.
5
+ #/
6
+ #/ Examples:
7
+ #/
8
+ #/ # run all tests
9
+ #/ test
10
+ #/
11
+ #/ # run individual test
12
+ #/ test test/controller_instrumentation_test.rb
13
+ #/
14
+
15
+ set -e
16
+ cd $(dirname "$0")/..
17
+
18
+ [ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && {
19
+ grep '^#/' <"$0"| cut -c4-
20
+ exit 0
21
+ }
22
+
23
+ script/bootstrap && bundle exec rake spec
@@ -3,7 +3,15 @@ require 'flipper/adapters/redis'
3
3
  require 'flipper/spec/shared_adapter_specs'
4
4
 
5
5
  describe Flipper::Adapters::Redis do
6
- let(:client) { Redis.new }
6
+ let(:client) {
7
+ options = {}
8
+
9
+ if ENV['BOXEN_REDIS_URL']
10
+ options[:url] = ENV['BOXEN_REDIS_URL']
11
+ end
12
+
13
+ Redis.new(options)
14
+ }
7
15
 
8
16
  subject { described_class.new(client) }
9
17
 
data/spec/helper.rb CHANGED
@@ -1,22 +1,7 @@
1
- $:.unshift(File.expand_path('../../lib', __FILE__))
2
-
3
- require 'pathname'
4
- require 'logger'
5
-
6
- root_path = Pathname(__FILE__).dirname.join('..').expand_path
7
- lib_path = root_path.join('lib')
8
- log_path = root_path.join('log')
9
- log_path.mkpath
10
-
11
1
  require 'rubygems'
12
2
  require 'bundler'
13
-
14
- Bundler.require(:default, :test)
15
-
16
3
  require 'flipper-redis'
17
4
 
18
- Logger.new(log_path.join('test.log'))
19
-
20
5
  RSpec.configure do |config|
21
6
  config.filter_run :focused => true
22
7
  config.alias_example_to :fit, :focused => true
metadata CHANGED
@@ -1,52 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
5
- prerelease:
4
+ version: 0.7.0.beta1
6
5
  platform: ruby
7
6
  authors:
8
7
  - John Nunemaker
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-04 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: flipper
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 0.6.0
19
+ version: 0.7.0.beta1
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 0.6.0
26
+ version: 0.7.0.beta1
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: redis
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '2.2'
38
- - - <
34
+ - - "<"
39
35
  - !ruby/object:Gem::Version
40
36
  version: 4.0.0
41
37
  type: :runtime
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
- - - ! '>='
41
+ - - ">="
47
42
  - !ruby/object:Gem::Version
48
43
  version: '2.2'
49
- - - <
44
+ - - "<"
50
45
  - !ruby/object:Gem::Version
51
46
  version: 4.0.0
52
47
  description: Redis adapter for Flipper
@@ -56,8 +51,8 @@ executables: []
56
51
  extensions: []
57
52
  extra_rdoc_files: []
58
53
  files:
59
- - .gitignore
60
- - .travis.yml
54
+ - ".gitignore"
55
+ - ".travis.yml"
61
56
  - Gemfile
62
57
  - Guardfile
63
58
  - LICENSE
@@ -69,37 +64,33 @@ files:
69
64
  - lib/flipper-redis.rb
70
65
  - lib/flipper/adapters/redis.rb
71
66
  - lib/flipper/adapters/redis/version.rb
67
+ - script/bootstrap
68
+ - script/release
69
+ - script/test
72
70
  - spec/flipper/redis_spec.rb
73
71
  - spec/helper.rb
74
72
  homepage: http://jnunemaker.github.com/flipper-redis
75
73
  licenses: []
74
+ metadata: {}
76
75
  post_install_message:
77
76
  rdoc_options: []
78
77
  require_paths:
79
78
  - lib
80
79
  required_ruby_version: !ruby/object:Gem::Requirement
81
- none: false
82
80
  requirements:
83
- - - ! '>='
81
+ - - ">="
84
82
  - !ruby/object:Gem::Version
85
83
  version: '0'
86
- segments:
87
- - 0
88
- hash: -4475383006967621136
89
84
  required_rubygems_version: !ruby/object:Gem::Requirement
90
- none: false
91
85
  requirements:
92
- - - ! '>='
86
+ - - ">"
93
87
  - !ruby/object:Gem::Version
94
- version: '0'
95
- segments:
96
- - 0
97
- hash: -4475383006967621136
88
+ version: 1.3.1
98
89
  requirements: []
99
90
  rubyforge_project:
100
- rubygems_version: 1.8.23
91
+ rubygems_version: 2.2.2
101
92
  signing_key:
102
- specification_version: 3
93
+ specification_version: 4
103
94
  summary: Redis adapter for Flipper
104
95
  test_files:
105
96
  - spec/flipper/redis_spec.rb