paraduct 1.0.0.beta6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  describe Paraduct::TestResponse do
2
- let(:test_response){ Paraduct::TestResponse.new }
2
+ let(:test_response) { Paraduct::TestResponse.new }
3
3
 
4
4
  describe "#successful?" do
5
- subject{ test_response.successful? }
5
+ subject { test_response.successful? }
6
6
 
7
7
  context "not include failure" do
8
8
  before do
@@ -24,12 +24,12 @@ describe Paraduct::TestResponse do
24
24
  end
25
25
 
26
26
  describe "#detail_message" do
27
- subject{ test_response.detail_message }
27
+ subject { test_response.detail_message }
28
28
 
29
29
  context "when successful" do
30
30
  before do
31
- test_response.jobs_push(successful: true, params: { "ruby" => "1.8", "database" => "sqlite3" } , formatted_params: "ruby=1.8, database=sqlite3")
32
- test_response.jobs_push(successful: true, params: { "ruby" => "1.9", "database" => "mysql" } , formatted_params: "ruby=1.9, database=mysql")
31
+ test_response.jobs_push(successful: true, params: { "ruby" => "1.8", "database" => "sqlite3" }, formatted_params: "ruby=1.8, database=sqlite3")
32
+ test_response.jobs_push(successful: true, params: { "ruby" => "1.9", "database" => "mysql" }, formatted_params: "ruby=1.9, database=mysql")
33
33
  test_response.jobs_push(successful: true, params: { "ruby" => "2.0", "database" => "postgresql" }, formatted_params: "ruby=2.0, database=postgresql")
34
34
  end
35
35
 
@@ -49,8 +49,8 @@ Passed:
49
49
 
50
50
  context "when failure" do
51
51
  before do
52
- test_response.jobs_push(successful: true , params: { "ruby" => "1.8", "database" => "sqlite3" } , formatted_params: "ruby=1.8, database=sqlite3")
53
- test_response.jobs_push(successful: false, params: { "ruby" => "1.9", "database" => "mysql" } , formatted_params: "ruby=1.9, database=mysql")
52
+ test_response.jobs_push(successful: true, params: { "ruby" => "1.8", "database" => "sqlite3" }, formatted_params: "ruby=1.8, database=sqlite3")
53
+ test_response.jobs_push(successful: false, params: { "ruby" => "1.9", "database" => "mysql" }, formatted_params: "ruby=1.9, database=mysql")
54
54
  test_response.jobs_push(successful: false, params: { "ruby" => "2.0", "database" => "postgresql" }, formatted_params: "ruby=2.0, database=postgresql")
55
55
  end
56
56
 
@@ -42,30 +42,29 @@ describe Paraduct::VariableConverter do
42
42
  end
43
43
 
44
44
  it { should have(12).entries }
45
- it { should include("ruby" => "1.9", "database" => "mysql" , "rails" => "3.2") }
46
- it { should include("ruby" => "2.0", "database" => "mysql" , "rails" => "3.2") }
47
- it { should include("ruby" => "2.1", "database" => "mysql" , "rails" => "3.2") }
45
+ it { should include("ruby" => "1.9", "database" => "mysql", "rails" => "3.2") }
46
+ it { should include("ruby" => "2.0", "database" => "mysql", "rails" => "3.2") }
47
+ it { should include("ruby" => "2.1", "database" => "mysql", "rails" => "3.2") }
48
48
  it { should include("ruby" => "1.9", "database" => "postgresql", "rails" => "3.2") }
49
49
  it { should include("ruby" => "2.0", "database" => "postgresql", "rails" => "3.2") }
50
50
  it { should include("ruby" => "2.1", "database" => "postgresql", "rails" => "3.2") }
51
- it { should include("ruby" => "1.9", "database" => "mysql" , "rails" => "4.0") }
52
- it { should include("ruby" => "2.0", "database" => "mysql" , "rails" => "4.0") }
53
- it { should include("ruby" => "2.1", "database" => "mysql" , "rails" => "4.0") }
51
+ it { should include("ruby" => "1.9", "database" => "mysql", "rails" => "4.0") }
52
+ it { should include("ruby" => "2.0", "database" => "mysql", "rails" => "4.0") }
53
+ it { should include("ruby" => "2.1", "database" => "mysql", "rails" => "4.0") }
54
54
  it { should include("ruby" => "1.9", "database" => "postgresql", "rails" => "4.0") }
55
55
  it { should include("ruby" => "2.0", "database" => "postgresql", "rails" => "4.0") }
56
56
  it { should include("ruby" => "2.1", "database" => "postgresql", "rails" => "4.0") }
57
57
  end
58
-
59
58
  end
60
59
 
61
60
  describe "#reject" do
62
- subject{ Paraduct::VariableConverter.reject(product_variables, exclude_variables) }
61
+ subject { Paraduct::VariableConverter.reject(product_variables, exclude_variables) }
63
62
 
64
63
  let(:product_variables) do
65
64
  [
66
- { "ruby" => "1.9", "database" => "mysql" , "rails" => "3.2" },
67
- { "ruby" => "2.0", "database" => "mysql" , "rails" => "3.2" },
68
- { "ruby" => "2.1", "database" => "mysql" , "rails" => "3.2" },
65
+ { "ruby" => "1.9", "database" => "mysql", "rails" => "3.2" },
66
+ { "ruby" => "2.0", "database" => "mysql", "rails" => "3.2" },
67
+ { "ruby" => "2.1", "database" => "mysql", "rails" => "3.2" },
69
68
  ]
70
69
  end
71
70
 
@@ -78,9 +77,9 @@ describe Paraduct::VariableConverter do
78
77
 
79
78
  it do
80
79
  should contain_exactly(
81
- { "ruby" => "1.9", "database" => "mysql", "rails" => "3.2" },
82
- { "ruby" => "2.1", "database" => "mysql", "rails" => "3.2" },
83
- )
80
+ { "ruby" => "1.9", "database" => "mysql", "rails" => "3.2" },
81
+ { "ruby" => "2.1", "database" => "mysql", "rails" => "3.2" }
82
+ )
84
83
  end
85
84
  end
86
85
 
@@ -93,42 +92,42 @@ describe Paraduct::VariableConverter do
93
92
 
94
93
  it do
95
94
  should contain_exactly(
96
- { "ruby" => "2.0", "database" => "mysql", "rails" => "3.2" },
97
- { "ruby" => "2.1", "database" => "mysql", "rails" => "3.2" },
98
- )
95
+ { "ruby" => "2.0", "database" => "mysql", "rails" => "3.2" },
96
+ { "ruby" => "2.1", "database" => "mysql", "rails" => "3.2" }
97
+ )
99
98
  end
100
99
  end
101
100
  end
102
101
 
103
102
  describe "#partial_match?" do
104
- subject{ Paraduct::VariableConverter.partial_match?(parent_hash, child_hash) }
103
+ subject { Paraduct::VariableConverter.partial_match?(parent_hash, child_hash) }
105
104
 
106
105
  context "with parent_hash == child_hash" do
107
- let(:parent_hash){ { a: 1, b: 2, c: 3 } }
106
+ let(:parent_hash) { { a: 1, b: 2, c: 3 } }
108
107
  let(:child_hash) { { a: 1, b: 2, c: 3 } }
109
108
 
110
- it{ should be true }
109
+ it { should be true }
111
110
  end
112
111
 
113
112
  context "with parent_hash > child_hash" do
114
- let(:parent_hash){ { a: 1, b: 2, c: 3 } }
113
+ let(:parent_hash) { { a: 1, b: 2, c: 3 } }
115
114
  let(:child_hash) { { a: 1, c: 3 } }
116
115
 
117
- it{ should be true }
116
+ it { should be true }
118
117
  end
119
118
 
120
119
  context "with parent_hash > child_hash, but value is not same" do
121
- let(:parent_hash){ { a: 1, b: 2, c: 3 } }
120
+ let(:parent_hash) { { a: 1, b: 2, c: 3 } }
122
121
  let(:child_hash) { { a: 1, c: 4 } }
123
122
 
124
- it{ should be false }
123
+ it { should be false }
125
124
  end
126
125
 
127
126
  context "with parent_hash < child_hash" do
128
- let(:parent_hash){ { a: 1, b: 2, c: 3 } }
127
+ let(:parent_hash) { { a: 1, b: 2, c: 3 } }
129
128
  let(:child_hash) { { a: 1, c: 3, d: 4 } }
130
129
 
131
- it{ should be false }
130
+ it { should be false }
132
131
  end
133
132
  end
134
133
  end
@@ -1,5 +1,5 @@
1
1
  describe Paraduct do
2
- it 'has a version number' do
2
+ it "has a version number" do
3
3
  expect(Paraduct::VERSION).not_to be nil
4
4
  end
5
5
  end
@@ -1,12 +1,12 @@
1
1
  if ENV["COVERAGE"]
2
- require 'simplecov'
3
- require 'coveralls'
4
- require 'codeclimate-test-reporter'
2
+ require "simplecov"
3
+ require "coveralls"
4
+ require "codeclimate-test-reporter"
5
5
 
6
6
  SimpleCov.formatter =
7
7
  SimpleCov::Formatter::MultiFormatter.new([
8
8
  CodeClimate::TestReporter::Formatter,
9
- Coveralls::SimpleCov::Formatter
9
+ Coveralls::SimpleCov::Formatter,
10
10
  ])
11
11
  SimpleCov.start do
12
12
  %w(/bin/ /vendor/ /spec/).each do |ignore_path|
@@ -15,13 +15,13 @@ if ENV["COVERAGE"]
15
15
  end
16
16
  end
17
17
 
18
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
19
- require 'paraduct'
20
- require 'paraduct/cli'
21
- require 'rspec/collection_matchers'
22
- require 'rspec/temp_dir'
23
- require 'rspec/its'
24
- require 'pry'
18
+ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
19
+ require "paraduct"
20
+ require "paraduct/cli"
21
+ require "rspec/collection_matchers"
22
+ require "rspec/temp_dir"
23
+ require "rspec/its"
24
+ require "pry"
25
25
 
26
26
  is_verbose = ENV["VERBOSE"].present?
27
27
 
@@ -71,54 +71,52 @@ RSpec.configure do |config|
71
71
  mocks.verify_partial_doubles = true
72
72
  end
73
73
 
74
- # The settings below are suggested to provide a good initial experience
75
- # with RSpec, but feel free to customize to your heart's content.
76
- =begin
77
- # These two settings work together to allow you to limit a spec run
78
- # to individual examples or groups you care about by tagging them with
79
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
80
- # get run.
81
- config.filter_run :focus
82
- config.run_all_when_everything_filtered = true
83
-
84
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
85
- # For more details, see:
86
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
87
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
88
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
89
- config.disable_monkey_patching!
90
-
91
- # This setting enables warnings. It's recommended, but in some cases may
92
- # be too noisy due to issues in dependencies.
93
- config.warnings = true
94
-
95
- # Many RSpec users commonly either run the entire suite or an individual
96
- # file, and it's useful to allow more verbose output when running an
97
- # individual spec file.
98
- if config.files_to_run.one?
99
- # Use the documentation formatter for detailed output,
100
- # unless a formatter has already been configured
101
- # (e.g. via a command-line flag).
102
- config.default_formatter = 'doc'
103
- end
104
-
105
- # Print the 10 slowest examples and example groups at the
106
- # end of the spec run, to help surface which specs are running
107
- # particularly slow.
108
- config.profile_examples = 10
109
-
110
- # Run specs in random order to surface order dependencies. If you find an
111
- # order dependency and want to debug it, you can fix the order by providing
112
- # the seed, which is printed after each run.
113
- # --seed 1234
114
- config.order = :random
115
-
116
- # Seed global randomization in this process using the `--seed` CLI option.
117
- # Setting this allows you to use `--seed` to deterministically reproduce
118
- # test failures related to randomization by passing the same `--seed` value
119
- # as the one that triggered the failure.
120
- Kernel.srand config.seed
121
- =end
74
+ # The settings below are suggested to provide a good initial experience
75
+ # with RSpec, but feel free to customize to your heart's content.
76
+ # # These two settings work together to allow you to limit a spec run
77
+ # # to individual examples or groups you care about by tagging them with
78
+ # # `:focus` metadata. When nothing is tagged with `:focus`, all examples
79
+ # # get run.
80
+ # config.filter_run :focus
81
+ # config.run_all_when_everything_filtered = true
82
+ #
83
+ # # Limits the available syntax to the non-monkey patched syntax that is recommended.
84
+ # # For more details, see:
85
+ # # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
86
+ # # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
87
+ # # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
88
+ # config.disable_monkey_patching!
89
+ #
90
+ # # This setting enables warnings. It's recommended, but in some cases may
91
+ # # be too noisy due to issues in dependencies.
92
+ # config.warnings = true
93
+ #
94
+ # # Many RSpec users commonly either run the entire suite or an individual
95
+ # # file, and it's useful to allow more verbose output when running an
96
+ # # individual spec file.
97
+ # if config.files_to_run.one?
98
+ # # Use the documentation formatter for detailed output,
99
+ # # unless a formatter has already been configured
100
+ # # (e.g. via a command-line flag).
101
+ # config.default_formatter = 'doc'
102
+ # end
103
+ #
104
+ # # Print the 10 slowest examples and example groups at the
105
+ # # end of the spec run, to help surface which specs are running
106
+ # # particularly slow.
107
+ # config.profile_examples = 10
108
+ #
109
+ # # Run specs in random order to surface order dependencies. If you find an
110
+ # # order dependency and want to debug it, you can fix the order by providing
111
+ # # the seed, which is printed after each run.
112
+ # # --seed 1234
113
+ # config.order = :random
114
+ #
115
+ # # Seed global randomization in this process using the `--seed` CLI option.
116
+ # # Setting this allows you to use `--seed` to deterministically reproduce
117
+ # # test failures related to randomization by passing the same `--seed` value
118
+ # # as the one that triggered the failure.
119
+ # Kernel.srand config.seed
122
120
 
123
121
  config.order = :random
124
122
 
@@ -1,11 +1,11 @@
1
1
  shared_context :stub_configuration do
2
2
  before do
3
- allow_any_instance_of(Paraduct::Configuration).to receive(:config_data){ config_data.stringify_keys.with_indifferent_access }
3
+ allow_any_instance_of(Paraduct::Configuration).to receive(:config_data) { config_data.stringify_keys.with_indifferent_access }
4
4
  end
5
5
 
6
6
  let(:config_data) do
7
7
  {
8
- script: %q(echo "NAME1=${NAME1}, NAME2=${NAME2}"),
8
+ script: 'echo "NAME1=${NAME1}, NAME2=${NAME2}"',
9
9
  work_dir: "tmp/paraduct_workspace",
10
10
  variables: {
11
11
  "NAME1" => ["value1a", "value1b"],
@@ -13,5 +13,4 @@ shared_context :within_temp_work_dir do
13
13
  after do
14
14
  Dir.chdir(@current_dir)
15
15
  end
16
-
17
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paraduct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta6
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-22 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 0.37.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 0.37.0
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: pry-byebug
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -244,7 +258,10 @@ extra_rdoc_files: []
244
258
  files:
245
259
  - ".coveralls.yml"
246
260
  - ".gitignore"
261
+ - ".hound.yml"
262
+ - ".onkcop.yml"
247
263
  - ".rspec"
264
+ - ".rubocop.yml"
248
265
  - ".tachikoma.yml"
249
266
  - ".travis.yml"
250
267
  - ".yardopts"
@@ -305,9 +322,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
305
322
  version: 2.0.0
306
323
  required_rubygems_version: !ruby/object:Gem::Requirement
307
324
  requirements:
308
- - - ">"
325
+ - - ">="
309
326
  - !ruby/object:Gem::Version
310
- version: 1.3.1
327
+ version: '0'
311
328
  requirements: []
312
329
  rubyforge_project:
313
330
  rubygems_version: 2.5.1