rails-sunset 0.1.0.pre.alpha1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,5 +3,11 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.1.0"
6
+ gem "activesupport", "~> 5.1.0"
7
+
8
+ group :development, :test do
9
+ gem "appraisal"
10
+ gem "wwtd"
11
+ end
6
12
 
7
13
  gemspec path: "../"
@@ -1,50 +1,45 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- we-call (0.5.4)
5
- faraday (>= 0.9.0, < 1.0)
6
- faraday-sunset (~> 0.1.0)
7
- faraday_middleware (~> 0)
8
- rails (>= 4.2)
9
- ruby_decorators (~> 0.0)
10
- typhoeus (~> 1.3)
4
+ rails-sunset (0.1.0)
5
+ rails (>= 4.2, < 6)
11
6
 
12
7
  GEM
13
8
  remote: https://rubygems.org/
14
9
  specs:
15
- actioncable (5.1.0)
16
- actionpack (= 5.1.0)
10
+ actioncable (5.1.4)
11
+ actionpack (= 5.1.4)
17
12
  nio4r (~> 2.0)
18
13
  websocket-driver (~> 0.6.1)
19
- actionmailer (5.1.0)
20
- actionpack (= 5.1.0)
21
- actionview (= 5.1.0)
22
- activejob (= 5.1.0)
14
+ actionmailer (5.1.4)
15
+ actionpack (= 5.1.4)
16
+ actionview (= 5.1.4)
17
+ activejob (= 5.1.4)
23
18
  mail (~> 2.5, >= 2.5.4)
24
19
  rails-dom-testing (~> 2.0)
25
- actionpack (5.1.0)
26
- actionview (= 5.1.0)
27
- activesupport (= 5.1.0)
20
+ actionpack (5.1.4)
21
+ actionview (= 5.1.4)
22
+ activesupport (= 5.1.4)
28
23
  rack (~> 2.0)
29
- rack-test (~> 0.6.3)
24
+ rack-test (>= 0.6.3)
30
25
  rails-dom-testing (~> 2.0)
31
26
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
32
- actionview (5.1.0)
33
- activesupport (= 5.1.0)
27
+ actionview (5.1.4)
28
+ activesupport (= 5.1.4)
34
29
  builder (~> 3.1)
35
30
  erubi (~> 1.4)
36
31
  rails-dom-testing (~> 2.0)
37
32
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
38
- activejob (5.1.0)
39
- activesupport (= 5.1.0)
33
+ activejob (5.1.4)
34
+ activesupport (= 5.1.4)
40
35
  globalid (>= 0.3.6)
41
- activemodel (5.1.0)
42
- activesupport (= 5.1.0)
43
- activerecord (5.1.0)
44
- activemodel (= 5.1.0)
45
- activesupport (= 5.1.0)
36
+ activemodel (5.1.4)
37
+ activesupport (= 5.1.4)
38
+ activerecord (5.1.4)
39
+ activemodel (= 5.1.4)
40
+ activesupport (= 5.1.4)
46
41
  arel (~> 8.0)
47
- activesupport (5.1.0)
42
+ activesupport (5.1.4)
48
43
  concurrent-ruby (~> 1.0, >= 1.0.2)
49
44
  i18n (~> 0.7)
50
45
  minitest (~> 5.1)
@@ -56,95 +51,88 @@ GEM
56
51
  arel (8.0.0)
57
52
  builder (3.2.3)
58
53
  concurrent-ruby (1.0.5)
59
- coveralls (0.7.1)
54
+ coveralls (0.7.2)
60
55
  multi_json (~> 1.3)
61
- rest-client
56
+ rest-client (= 1.6.7)
62
57
  simplecov (>= 0.7)
63
- term-ansicolor
64
- thor
58
+ term-ansicolor (= 1.2.2)
59
+ thor (= 0.18.1)
60
+ crass (1.0.2)
65
61
  diff-lcs (1.3)
66
62
  docile (1.1.5)
67
- domain_name (0.5.20170404)
68
- unf (>= 0.0.5, < 1.0.0)
69
- erubi (1.6.0)
70
- ethon (0.11.0)
71
- ffi (>= 1.3.0)
72
- faraday (0.13.1)
73
- multipart-post (>= 1.2, < 3)
74
- faraday-sunset (0.1.1)
75
- faraday (>= 0.9.0, < 0.14)
76
- faraday_middleware (0.12.2)
77
- faraday (>= 0.7.4, < 1.0)
78
- ffi (1.9.18)
79
- globalid (0.4.0)
63
+ erubi (1.7.0)
64
+ globalid (0.4.1)
80
65
  activesupport (>= 4.2.0)
81
- hashie (3.5.5)
82
- http-cookie (1.0.3)
83
- domain_name (~> 0.5)
84
- i18n (0.8.1)
66
+ i18n (0.9.1)
67
+ concurrent-ruby (~> 1.0)
85
68
  json (2.1.0)
86
- loofah (2.0.3)
69
+ loofah (2.1.1)
70
+ crass (~> 1.0.2)
87
71
  nokogiri (>= 1.5.9)
88
- mail (2.6.5)
89
- mime-types (>= 1.16, < 4)
90
- method_source (0.8.2)
72
+ mail (2.7.0)
73
+ mini_mime (>= 0.1.1)
74
+ method_source (0.9.0)
91
75
  mime-types (3.1)
92
76
  mime-types-data (~> 3.2015)
93
77
  mime-types-data (3.2016.0521)
94
- mini_portile2 (2.1.0)
95
- minitest (5.10.1)
96
- multi_json (1.12.1)
97
- multipart-post (2.0.0)
98
- netrc (0.11.0)
99
- nio4r (2.0.0)
100
- nokogiri (1.7.1)
101
- mini_portile2 (~> 2.1.0)
102
- rack (2.0.1)
103
- rack-test (0.6.3)
104
- rack (>= 1.0)
105
- rails (5.1.0)
106
- actioncable (= 5.1.0)
107
- actionmailer (= 5.1.0)
108
- actionpack (= 5.1.0)
109
- actionview (= 5.1.0)
110
- activejob (= 5.1.0)
111
- activemodel (= 5.1.0)
112
- activerecord (= 5.1.0)
113
- activesupport (= 5.1.0)
114
- bundler (>= 1.3.0, < 2.0)
115
- railties (= 5.1.0)
78
+ mini_mime (1.0.0)
79
+ mini_portile2 (2.3.0)
80
+ minitest (5.10.3)
81
+ multi_json (1.12.2)
82
+ nio4r (2.1.0)
83
+ nokogiri (1.8.1)
84
+ mini_portile2 (~> 2.3.0)
85
+ rack (2.0.3)
86
+ rack-test (0.7.0)
87
+ rack (>= 1.0, < 3)
88
+ rails (5.1.4)
89
+ actioncable (= 5.1.4)
90
+ actionmailer (= 5.1.4)
91
+ actionpack (= 5.1.4)
92
+ actionview (= 5.1.4)
93
+ activejob (= 5.1.4)
94
+ activemodel (= 5.1.4)
95
+ activerecord (= 5.1.4)
96
+ activesupport (= 5.1.4)
97
+ bundler (>= 1.3.0)
98
+ railties (= 5.1.4)
116
99
  sprockets-rails (>= 2.0.0)
117
- rails-dom-testing (2.0.2)
118
- activesupport (>= 4.2.0, < 6.0)
119
- nokogiri (~> 1.6)
100
+ rails-dom-testing (2.0.3)
101
+ activesupport (>= 4.2.0)
102
+ nokogiri (>= 1.6)
120
103
  rails-html-sanitizer (1.0.3)
121
104
  loofah (~> 2.0)
122
- railties (5.1.0)
123
- actionpack (= 5.1.0)
124
- activesupport (= 5.1.0)
105
+ railties (5.1.4)
106
+ actionpack (= 5.1.4)
107
+ activesupport (= 5.1.4)
125
108
  method_source
126
109
  rake (>= 0.8.7)
127
110
  thor (>= 0.18.1, < 2.0)
128
- rake (12.0.0)
129
- rest-client (2.0.2)
130
- http-cookie (>= 1.0.2, < 2.0)
131
- mime-types (>= 1.16, < 4.0)
132
- netrc (~> 0.8)
133
- rspec (3.6.0)
134
- rspec-core (~> 3.6.0)
135
- rspec-expectations (~> 3.6.0)
136
- rspec-mocks (~> 3.6.0)
137
- rspec-core (3.6.0)
138
- rspec-support (~> 3.6.0)
139
- rspec-expectations (3.6.0)
111
+ rake (12.2.1)
112
+ rest-client (1.6.7)
113
+ mime-types (>= 1.16)
114
+ rspec (3.7.0)
115
+ rspec-core (~> 3.7.0)
116
+ rspec-expectations (~> 3.7.0)
117
+ rspec-mocks (~> 3.7.0)
118
+ rspec-core (3.7.0)
119
+ rspec-support (~> 3.7.0)
120
+ rspec-expectations (3.7.0)
140
121
  diff-lcs (>= 1.2.0, < 2.0)
141
- rspec-support (~> 3.6.0)
142
- rspec-mocks (3.6.0)
122
+ rspec-support (~> 3.7.0)
123
+ rspec-mocks (3.7.0)
143
124
  diff-lcs (>= 1.2.0, < 2.0)
144
- rspec-support (~> 3.6.0)
145
- rspec-support (3.6.0)
146
- ruby_decorators (0.0.3)
147
- simplecov (0.15.0)
125
+ rspec-support (~> 3.7.0)
126
+ rspec-rails (3.7.1)
127
+ actionpack (>= 3.0)
128
+ activesupport (>= 3.0)
129
+ railties (>= 3.0)
130
+ rspec-core (~> 3.7.0)
131
+ rspec-expectations (~> 3.7.0)
132
+ rspec-mocks (~> 3.7.0)
133
+ rspec-support (~> 3.7.0)
134
+ rspec-support (3.7.0)
135
+ simplecov (0.15.1)
148
136
  docile (~> 1.1.0)
149
137
  json (>= 1.8, < 3)
150
138
  simplecov-html (~> 0.10.0)
@@ -152,41 +140,36 @@ GEM
152
140
  sprockets (3.7.1)
153
141
  concurrent-ruby (~> 1.0)
154
142
  rack (> 1, < 3)
155
- sprockets-rails (3.2.0)
143
+ sprockets-rails (3.2.1)
156
144
  actionpack (>= 4.0)
157
145
  activesupport (>= 4.0)
158
146
  sprockets (>= 3.0.0)
159
- term-ansicolor (1.6.0)
160
- tins (~> 1.0)
161
- thor (0.19.4)
147
+ term-ansicolor (1.2.2)
148
+ tins (~> 0.8)
149
+ thor (0.18.1)
162
150
  thread_safe (0.3.6)
163
- tins (1.15.0)
164
- typhoeus (1.3.0)
165
- ethon (>= 0.9.0)
166
- tzinfo (1.2.3)
151
+ tins (0.13.2)
152
+ tzinfo (1.2.4)
167
153
  thread_safe (~> 0.1)
168
- unf (0.1.4)
169
- unf_ext
170
- unf_ext (0.0.7.4)
171
- vcr (3.0.3)
172
154
  websocket-driver (0.6.5)
173
155
  websocket-extensions (>= 0.1.0)
174
156
  websocket-extensions (0.1.2)
157
+ wwtd (1.3.0)
175
158
 
176
159
  PLATFORMS
177
160
  ruby
178
161
 
179
162
  DEPENDENCIES
180
- appraisal (~> 2)
181
- bundler (~> 1.14)
182
- coveralls (~> 0.7)
183
- hashie (~> 3.5)
163
+ activesupport (~> 5.1.0)
164
+ appraisal
165
+ bundler
166
+ coveralls
184
167
  rails (~> 5.1.0)
185
- rake (~> 12.0)
186
- rspec (~> 3.5)
187
- simplecov (~> 0.15)
188
- vcr (~> 3)
189
- we-call!
168
+ rails-sunset!
169
+ rspec (>= 3.6)
170
+ rspec-rails
171
+ simplecov
172
+ wwtd
190
173
 
191
174
  BUNDLED WITH
192
- 1.14.6
175
+ 1.16.0
@@ -1,3 +1,4 @@
1
+
1
2
  module RailsSunset
2
3
  module Controller
3
4
  extend ActiveSupport::Concern
@@ -11,11 +12,12 @@ module RailsSunset
11
12
  after_action(only: only) do |controller|
12
13
  datetime = normalize_datetime(datetime)
13
14
  link = normalize_link(link, params)
15
+ user_agent = request.headers['User-Agent']
14
16
 
15
17
  # Shove a deprecation warning into the console or wherever it goes
16
18
  klass = controller.class
17
19
  method = params['action']
18
- ActiveSupport::Deprecation.warn("#{klass}##{method} is deprecated for removal on #{datetime.iso8601}")
20
+ ActiveSupport::Deprecation.warn("#{klass}##{method} deprecated endpoint (sunset date #{datetime.iso8601}) has been called by #{user_agent}")
19
21
 
20
22
  # Shove a Sunset header into HTTP Response for clients to sniff on
21
23
  # https://tools.ietf.org/html/draft-wilde-sunset-header-03
@@ -43,7 +45,7 @@ module RailsSunset
43
45
  end
44
46
 
45
47
  def normalize_link(link, _params)
46
- link = link.call(_params) if link.respond_to? :call
48
+ link = instance_exec(&(link)) if link.respond_to? :call
47
49
  return if link.nil?
48
50
  return link if link.is_a? String
49
51
  raise TypeError, 'The link should be a string, or a lambda that returns a string'
@@ -1,3 +1,3 @@
1
1
  module RailsSunset
2
- VERSION = "0.1.0-alpha1"
2
+ VERSION = "0.1.0"
3
3
  end
data/rails-sunset.gemspec CHANGED
@@ -20,16 +20,11 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = "bin"
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_dependency "rails", ">= 4.2"
24
- spec.add_dependency "activesupport"
23
+ spec.add_dependency "rails", ">= 4.2", "< 6"
25
24
 
26
- spec.add_development_dependency "appraisal", "~> 2"
27
- spec.add_development_dependency "coveralls", '~> 0.7'
28
- spec.add_development_dependency "bundler", ">= 1.14"
29
- spec.add_development_dependency "rake", "~> 12.0"
25
+ spec.add_development_dependency "bundler"
26
+ spec.add_development_dependency "coveralls"
30
27
  spec.add_development_dependency "rspec", ">= 3.6"
31
28
  spec.add_development_dependency "rspec-rails"
32
- spec.add_development_dependency "byebug"
33
- spec.add_development_dependency "simplecov", '~> 0.15'
34
- spec.add_development_dependency "sqlite3" # i dont even want a db ffs rails
29
+ spec.add_development_dependency "simplecov"
35
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-sunset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WeWork Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,76 +27,37 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '4.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6'
27
33
  - !ruby/object:Gem::Dependency
28
- name: activesupport
34
+ name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
33
39
  version: '0'
34
- type: :runtime
40
+ type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - ">="
39
45
  - !ruby/object:Gem::Version
40
46
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: appraisal
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2'
55
47
  - !ruby/object:Gem::Dependency
56
48
  name: coveralls
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.7'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0.7'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
49
  requirement: !ruby/object:Gem::Requirement
72
50
  requirements:
73
51
  - - ">="
74
52
  - !ruby/object:Gem::Version
75
- version: '1.14'
53
+ version: '0'
76
54
  type: :development
77
55
  prerelease: false
78
56
  version_requirements: !ruby/object:Gem::Requirement
79
57
  requirements:
80
58
  - - ">="
81
59
  - !ruby/object:Gem::Version
82
- version: '1.14'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '12.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '12.0'
60
+ version: '0'
97
61
  - !ruby/object:Gem::Dependency
98
62
  name: rspec
99
63
  requirement: !ruby/object:Gem::Requirement
@@ -122,36 +86,8 @@ dependencies:
122
86
  - - ">="
123
87
  - !ruby/object:Gem::Version
124
88
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: byebug
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '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'
139
89
  - !ruby/object:Gem::Dependency
140
90
  name: simplecov
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.15'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.15'
153
- - !ruby/object:Gem::Dependency
154
- name: sqlite3
155
91
  requirement: !ruby/object:Gem::Requirement
156
92
  requirements:
157
93
  - - ">="
@@ -173,6 +109,7 @@ extensions: []
173
109
  extra_rdoc_files: []
174
110
  files:
175
111
  - ".gitignore"
112
+ - ".travis.yml"
176
113
  - Appraisals
177
114
  - CHANGELOG.md
178
115
  - Gemfile
@@ -181,20 +118,6 @@ files:
181
118
  - Rakefile
182
119
  - bin/console
183
120
  - bin/setup
184
- - gemfiles/.bundle/config
185
- - gemfiles/faraday_0.10.gemfile
186
- - gemfiles/faraday_0.10.gemfile.lock
187
- - gemfiles/faraday_0.11.gemfile
188
- - gemfiles/faraday_0.11.gemfile.lock
189
- - gemfiles/faraday_0.12.gemfile
190
- - gemfiles/faraday_0.12.gemfile.lock
191
- - gemfiles/faraday_0.13.gemfile
192
- - gemfiles/faraday_0.13.gemfile.lock
193
- - gemfiles/faraday_0.8.gemfile
194
- - gemfiles/faraday_0.8.gemfile.lock
195
- - gemfiles/faraday_0.9.gemfile
196
- - gemfiles/faraday_0.9.gemfile.lock
197
- - gemfiles/faraday_5.1.gemfile
198
121
  - gemfiles/rails_4.2.gemfile
199
122
  - gemfiles/rails_4.2.gemfile.lock
200
123
  - gemfiles/rails_5.0.gemfile
@@ -221,12 +144,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
144
  version: '0'
222
145
  required_rubygems_version: !ruby/object:Gem::Requirement
223
146
  requirements:
224
- - - ">"
147
+ - - ">="
225
148
  - !ruby/object:Gem::Version
226
- version: 1.3.1
149
+ version: '0'
227
150
  requirements: []
228
151
  rubyforge_project:
229
- rubygems_version: 2.6.8
152
+ rubygems_version: 2.5.2.1
230
153
  signing_key:
231
154
  specification_version: 4
232
155
  summary: Take out your trash endpoints
@@ -1,2 +0,0 @@
1
- ---
2
- BUNDLE_RETRY: "1"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "faraday", "~> 0.10.0"
6
-
7
- gemspec path: "../"