interactor-rails 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 651950b7c82de4b4f3787c3ffbe0b3b0c1e44e1e
4
- data.tar.gz: 9acc70cd7f1fd7215ac10e579ef5c42a364ffbfa
3
+ metadata.gz: 1f16d380b172d47fdd45e7e203fe9b01e5d26b09
4
+ data.tar.gz: be6c3593141cb18fc28aaa8083385c1a1ebc389a
5
5
  SHA512:
6
- metadata.gz: 346a9e84d2f22417935629905266ce773bf3e071f8f8551de7e4b339c611fd619d5cba9448d5e7e16948bafdf25e2156fd81556cb9e86ce6bfe5727b16e24b0d
7
- data.tar.gz: 19523b3fa86e1471ee710822982fee698ab59bab13abe8e8aafbb82779c41efffa37596163fe4b53e5c6295310e52b69f9d6b6b9c1e31ba814951c29497ac0e9
6
+ metadata.gz: 066b0d3946305cc97403baccbc70a69fd02aadd27c168e2bf40c84414d1818b66a255f276ae98d10077448ca29d56afb1a45f25c6a74db00464416c49d35394b
7
+ data.tar.gz: 5b2314cd1caced59af8a449fb3bab038280e91fe030283dd018fa6c627de683687fb3f2d124841e83e051ffe40701d20115aac8e09a361627311b15ffac81fd3
data/.travis.yml CHANGED
@@ -3,35 +3,25 @@ before_install:
3
3
  branches:
4
4
  only:
5
5
  - master
6
- cache: bundler
7
- env:
8
- global:
9
- - secure: | # CODECLIMATE_REPO_TOKEN
10
- LANA2wEG+eJ4a+Sl0Uhw343XutMp00m/+IV4n7T+AYpFmzmBPB8k5kVP1SZR
11
- lhqpkdWuJlpaSUyP1EvODyS3Ryg+UtCXXKa0vX6AQseYZqMzXoWWWS1UPHx5
12
- R5/Dvko4JIPfOeeXwyPGnBhzewdQSqXcQR5UnPIWPG7jvfoCd/Q=
13
6
  gemfile:
14
- - gemfiles/rails30.gemfile
15
- - gemfiles/rails31.gemfile
16
- - gemfiles/rails32.gemfile
17
- - gemfiles/rails40.gemfile
18
- - gemfiles/rails41.gemfile
19
7
  - gemfiles/rails42.gemfile
8
+ - gemfiles/rails50.gemfile
9
+ - gemfiles/rails51.gemfile
10
+ - gemfiles/rails51+.gemfile
20
11
  language: ruby
21
12
  matrix:
22
13
  allow_failures:
23
14
  - rvm: ruby-head
24
- include:
25
- - rvm: 2.2.2
26
- gemfile: gemfiles/rails50.gemfile
27
- - rvm: 2.3.0
28
- gemfile: gemfiles/rails50.gemfile
15
+ - gemfile: gemfiles/rails51+.gemfile
16
+ notifications:
17
+ webhooks:
18
+ on_start: always
19
+ urls:
20
+ - https://buildlight.collectiveidea.com/
29
21
  rvm:
30
- - 1.9.3
31
- - "2.0"
32
- - "2.1"
33
- - 2.2.2
34
- - 2.3.0
22
+ - 2.2.7
23
+ - 2.3.4
24
+ - 2.4.1
35
25
  - ruby-head
36
- script: bundle exec rspec
26
+ script: bundle exec rspec --format=documentation
37
27
  sudo: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2.1.0 / 2017-05-09
2
+
3
+ * [FEATURE] Add spec templates
4
+ * [ENHANCEMENT] Add support for Ruby 2.4
5
+ * [ENHANCEMENT] Drop support for EOL Ruby versions 1.9.3, 2.0, and 2.1
6
+ * [ENHANCEMENT] Add support for Rails 5.1
7
+ * [ENHANCEMENT] Drop support for EOL Rails versions 3.0, 3.1, 3.2, 4.0, and 4.1
8
+
1
9
  ## 2.0.2 / 2016-03-18
2
10
 
3
11
  * [ENHANCEMENT] Add support for Ruby versions 2.1, 2.2, and 2.3
data/README.md CHANGED
@@ -17,8 +17,8 @@ Add this line to your application's Gemfile:
17
17
  gem "interactor-rails", "~> 2.0"
18
18
  ```
19
19
 
20
- Interactor Rails is compatible with Ruby 1.9.3, 2.0, 2.1, 2.2, or 2.3 on Rails
21
- 3, 4, or 5.
20
+ Interactor Rails is compatible with Ruby 2.2, 2.3, or 2.4 on Rails
21
+ 4.2, 5.0, or 5.1.
22
22
 
23
23
  ## Usage
24
24
 
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  gemspec path: ".."
4
4
 
5
5
  gem "rails", "~> 4.2.0"
6
+ gem "mime-types", "< 3.0", platform: [:mri_19]
6
7
 
7
8
  group :test do
8
9
  gem "aruba"
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec path: ".."
4
4
 
5
- gem "rails", "~> 3.0.0"
5
+ gem "rails", ">= 5.1"
6
6
 
7
7
  group :test do
8
8
  gem "aruba"
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec path: ".."
4
4
 
5
- gem "rails", "~> 3.1.0"
5
+ gem "rails", "~> 5.1.0"
6
6
 
7
7
  group :test do
8
8
  gem "aruba"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "interactor-rails"
5
- spec.version = "2.0.2"
5
+ spec.version = "2.1.0"
6
6
 
7
7
  spec.author = "Collective Idea"
8
8
  spec.email = "info@collectiveidea.com"
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.test_files = spec.files.grep(/^spec/)
16
16
 
17
17
  spec.add_dependency "interactor", "~> 3.0"
18
- spec.add_dependency "rails", ">= 3", "< 5.1"
18
+ spec.add_dependency "rails", ">= 3", "< 5.2"
19
19
 
20
20
  spec.add_development_dependency "bundler"
21
21
  spec.add_development_dependency "rake"
@@ -6,6 +6,7 @@ module Interactor
6
6
 
7
7
  def generate
8
8
  template "#{self.class.generator_name}.erb", File.join("app/interactors", class_path, "#{file_name}.rb")
9
+ template "spec.erb", File.join("spec/interactors", class_path, "#{file_name}_spec.rb")
9
10
  end
10
11
  end
11
12
  end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe <%= class_name %>, type: :interactor do
4
+ describe '.call' do
5
+ pending "add some examples to (or delete) #{__FILE__}"
6
+ end
7
+ end
@@ -8,14 +8,24 @@ module Interactor
8
8
  before do
9
9
  run_simple <<-CMD
10
10
  bundle exec rails new example \
11
+ --skip-yarn \
11
12
  --skip-gemfile \
12
- --skip-bundle \
13
13
  --skip-git \
14
14
  --skip-keeps \
15
+ --skip-action-mailer \
15
16
  --skip-active-record \
17
+ --skip-puma \
18
+ --skip-action-cable \
16
19
  --skip-sprockets \
20
+ --skip-spring \
21
+ --skip-listen \
22
+ --skip-coffee \
17
23
  --skip-javascript \
24
+ --skip-turbolinks \
18
25
  --skip-test-unit \
26
+ --skip-test \
27
+ --skip-system-test \
28
+ --skip-bundle \
19
29
  --quiet
20
30
  CMD
21
31
  cd "example"
@@ -28,7 +38,7 @@ module Interactor
28
38
 
29
39
  context "rails generate" do
30
40
  context "interactor" do
31
- it "generates an interactor" do
41
+ it "generates an interactor and spec" do
32
42
  run_simple "bundle exec rails generate interactor place_order"
33
43
 
34
44
  path = "app/interactors/place_order.rb"
@@ -41,6 +51,18 @@ class PlaceOrder
41
51
  # TODO
42
52
  end
43
53
  end
54
+ EOF
55
+
56
+ path = 'spec/interactors/place_order_spec.rb'
57
+ expect(path).to be_an_existing_file
58
+ expect(path).to have_file_content(<<-EOF)
59
+ require 'spec_helper'
60
+
61
+ RSpec.describe PlaceOrder, type: :interactor do
62
+ describe '.call' do
63
+ pending "add some examples to (or delete) \#{__FILE__}"
64
+ end
65
+ end
44
66
  EOF
45
67
  end
46
68
 
@@ -64,6 +86,18 @@ class Invoice::PlaceOrder
64
86
  # TODO
65
87
  end
66
88
  end
89
+ EOF
90
+
91
+ path = "spec/interactors/invoice/place_order_spec.rb"
92
+ expect(path).to be_an_existing_file
93
+ expect(path).to have_file_content(<<-EOF)
94
+ require 'spec_helper'
95
+
96
+ RSpec.describe Invoice::PlaceOrder, type: :interactor do
97
+ describe '.call' do
98
+ pending "add some examples to (or delete) \#{__FILE__}"
99
+ end
100
+ end
67
101
  EOF
68
102
  end
69
103
  end
@@ -82,6 +116,18 @@ class PlaceOrder
82
116
 
83
117
  # organize Interactor1, Interactor2
84
118
  end
119
+ EOF
120
+
121
+ path = "spec/interactors/place_order_spec.rb"
122
+ expect(path).to be_an_existing_file
123
+ expect(path).to have_file_content(<<-EOF)
124
+ require 'spec_helper'
125
+
126
+ RSpec.describe PlaceOrder, type: :interactor do
127
+ describe '.call' do
128
+ pending "add some examples to (or delete) \#{__FILE__}"
129
+ end
130
+ end
85
131
  EOF
86
132
  end
87
133
 
@@ -120,6 +166,18 @@ class Invoice::PlaceOrder
120
166
 
121
167
  # organize Interactor1, Interactor2
122
168
  end
169
+ EOF
170
+
171
+ path = "spec/interactors/invoice/place_order_spec.rb"
172
+ expect(path).to be_an_existing_file
173
+ expect(path).to have_file_content(<<-EOF)
174
+ require 'spec_helper'
175
+
176
+ RSpec.describe Invoice::PlaceOrder, type: :interactor do
177
+ describe '.call' do
178
+ pending "add some examples to (or delete) \#{__FILE__}"
179
+ end
180
+ end
123
181
  EOF
124
182
  end
125
183
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  if ENV["CODECLIMATE_REPO_TOKEN"]
2
- require "codeclimate-test-reporter"
3
- CodeClimate::TestReporter.start
2
+ require "simplecov"
3
+ SimpleCov.start
4
4
  end
5
5
 
6
6
  require "interactor/rails"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interactor-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collective Idea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-18 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: interactor
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '3'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '5.1'
36
+ version: '5.2'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '5.1'
46
+ version: '5.2'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -87,19 +87,17 @@ files:
87
87
  - LICENSE.txt
88
88
  - README.md
89
89
  - Rakefile
90
- - gemfiles/rails30.gemfile
91
- - gemfiles/rails31.gemfile
92
- - gemfiles/rails32.gemfile
93
- - gemfiles/rails40.gemfile
94
- - gemfiles/rails41.gemfile
95
90
  - gemfiles/rails42.gemfile
96
91
  - gemfiles/rails50.gemfile
92
+ - gemfiles/rails51+.gemfile
93
+ - gemfiles/rails51.gemfile
97
94
  - interactor-rails.gemspec
98
95
  - lib/generators/interactor.rb
99
96
  - lib/generators/interactor/organizer_generator.rb
100
97
  - lib/generators/interactor_generator.rb
101
98
  - lib/generators/templates/interactor.erb
102
99
  - lib/generators/templates/organizer.erb
100
+ - lib/generators/templates/spec.erb
103
101
  - lib/interactor/rails.rb
104
102
  - spec/interactor/rails_spec.rb
105
103
  - spec/spec_helper.rb
@@ -124,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
122
  version: '0'
125
123
  requirements: []
126
124
  rubyforge_project:
127
- rubygems_version: 2.5.1
125
+ rubygems_version: 2.6.11
128
126
  signing_key:
129
127
  specification_version: 4
130
128
  summary: Rails support for Interactor
@@ -1,11 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "rails", "~> 3.2.0"
6
-
7
- group :test do
8
- gem "aruba"
9
- gem "codeclimate-test-reporter", require: false
10
- gem "rspec"
11
- end
@@ -1,11 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "rails", "~> 4.0.0"
6
-
7
- group :test do
8
- gem "aruba"
9
- gem "codeclimate-test-reporter", require: false
10
- gem "rspec"
11
- end
@@ -1,11 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: ".."
4
-
5
- gem "rails", "~> 4.1.0"
6
-
7
- group :test do
8
- gem "aruba"
9
- gem "codeclimate-test-reporter", require: false
10
- gem "rspec"
11
- end