middleman-automatic-clowncar 0.0.1 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,42 @@
1
+ module Middleman
2
+ module AutomaticClowncar
3
+ class TimestampResource < ::Middleman::Sitemap::Resource
4
+
5
+ attr_accessor :output
6
+
7
+ def initialize(store, path, origin, source_dir)
8
+ @source_dir = source_dir
9
+ @origin = origin
10
+ super(store, path, source_dir.to_s)
11
+ end
12
+
13
+ def template?
14
+ false
15
+ end
16
+
17
+ def render(*args, &block)
18
+ Utils.origin_mtime(@source_dir,@origin)
19
+ end
20
+
21
+ def source_file
22
+ nil
23
+ end
24
+ # def request_path
25
+ # @request_path
26
+ # end
27
+
28
+ def binary?
29
+ false
30
+ end
31
+
32
+ def raw_data
33
+ {}
34
+ end
35
+
36
+ def ignored?
37
+ false
38
+ end
39
+
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,38 @@
1
+ module Middleman
2
+ module AutomaticClowncar
3
+ class Utils
4
+
5
+
6
+ def self.origin_mtime(source_dir,origin)
7
+ origin_path = File.join(source_dir,naked_origin(source_dir,origin))
8
+ origin_mtime = File.mtime(origin_path).to_s.strip
9
+ end
10
+
11
+ def self.stored_timestamp(source_dir,output_dir,origin)
12
+ path = File.join(output_dir, clowncar_timestamp_path(source_dir,origin))
13
+ return nil if !File.exist?(path)
14
+ File.open(path).read.strip
15
+ end
16
+
17
+ def self.timestamp_current?(source_dir,output_dir,origin)
18
+ origin_mtime(source_dir,origin) == stored_timestamp(source_dir,output_dir,origin)
19
+ end
20
+
21
+ def self.clowncar_dir(source_dir,origin)
22
+ dirname = File.dirname(naked_origin(source_dir,origin))
23
+ filename = File.basename(origin,'.*')
24
+ File.join(dirname,filename)
25
+ end
26
+
27
+ def self.clowncar_timestamp_path(source_dir,origin)
28
+ File.join( clowncar_dir(source_dir,origin), "timestamp.txt" );
29
+ end
30
+
31
+ # strip the source_dir and any leading slashes
32
+ def self.naked_origin(source_dir,origin)
33
+ origin.gsub(source_dir.to_s + File::SEPARATOR, '')
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module MiddlemanAutomaticClowncar
2
- VERSION = "0.0.1"
2
+ VERSION = "4.0.1"
3
3
  end
@@ -18,12 +18,21 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "middleman-core", "~> 3.2"
22
- spec.add_dependency("rmagick", ["~> 2.13.0"])
23
- spec.add_dependency "fastimage", "~> 1.5.5"
21
+ spec.add_dependency "middleman-core", "~> 4.3.0"
24
22
 
23
+ spec.add_dependency("mini_magick", ["~> 3.7.0"])
24
+ spec.add_dependency "fastimage", "~> 2.0"
25
+
26
+ # These are here to make sure that we don't have any collisions with sprockets
27
+ spec.add_dependency "middleman-sprockets", "~> 4.1.0"
28
+ #spec.add_dependency "sass", "~> 3.4.0"
29
+
30
+ spec.add_development_dependency "middleman", "~> 4.3.0"
25
31
  spec.add_development_dependency "bundler", "~> 1.5"
26
32
  spec.add_development_dependency "rake"
27
- spec.add_development_dependency "cucumber", "~> 1.3.10"
28
- spec.add_development_dependency "aruba", "~> 0.5.1"
33
+ spec.add_development_dependency "capybara", "~> 2.5.0"
34
+ spec.add_development_dependency "cucumber", "~> 2.0"
35
+ spec.add_development_dependency "aruba", "~> 0.14.0"
36
+ spec.add_development_dependency "byebug"
37
+ #spec.add_development_dependency "simplecov", "~> 0.8.2"
29
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-automatic-clowncar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-18 00:00:00.000000000 Z
11
+ date: 2020-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -16,42 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: 4.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: 4.3.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: rmagick
28
+ name: mini_magick
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.13.0
33
+ version: 3.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.13.0
40
+ version: 3.7.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: fastimage
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.5
47
+ version: '2.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.5
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: middleman-sprockets
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 4.1.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 4.1.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: middleman
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 4.3.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 4.3.0
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: bundler
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -80,34 +108,62 @@ dependencies:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: capybara
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 2.5.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 2.5.0
83
125
  - !ruby/object:Gem::Dependency
84
126
  name: cucumber
85
127
  requirement: !ruby/object:Gem::Requirement
86
128
  requirements:
87
129
  - - "~>"
88
130
  - !ruby/object:Gem::Version
89
- version: 1.3.10
131
+ version: '2.0'
90
132
  type: :development
91
133
  prerelease: false
92
134
  version_requirements: !ruby/object:Gem::Requirement
93
135
  requirements:
94
136
  - - "~>"
95
137
  - !ruby/object:Gem::Version
96
- version: 1.3.10
138
+ version: '2.0'
97
139
  - !ruby/object:Gem::Dependency
98
140
  name: aruba
99
141
  requirement: !ruby/object:Gem::Requirement
100
142
  requirements:
101
143
  - - "~>"
102
144
  - !ruby/object:Gem::Version
103
- version: 0.5.1
145
+ version: 0.14.0
104
146
  type: :development
105
147
  prerelease: false
106
148
  version_requirements: !ruby/object:Gem::Requirement
107
149
  requirements:
108
150
  - - "~>"
109
151
  - !ruby/object:Gem::Version
110
- version: 0.5.1
152
+ version: 0.14.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: byebug
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
111
167
  description: Automatically generated responsive images for middleman.
112
168
  email:
113
169
  - jeremy@octolabs.com
@@ -116,6 +172,8 @@ extensions: []
116
172
  extra_rdoc_files: []
117
173
  files:
118
174
  - ".gitignore"
175
+ - ".ruby-version"
176
+ - ".travis.yml"
119
177
  - Gemfile
120
178
  - LICENSE.txt
121
179
  - README.md
@@ -123,15 +181,22 @@ files:
123
181
  - features/clowncar_tag_build.feature
124
182
  - features/clowncar_tag_preview.feature
125
183
  - features/support/env.rb
184
+ - features/support/step_definitions.rb
126
185
  - features/thumbnail_generation.feature
127
186
  - fixtures/automatic-clowncar-app/config.rb
128
- - fixtures/automatic-clowncar-app/source/images/photos/test-image.jpg
187
+ - fixtures/automatic-clowncar-app/profile/build.html
129
188
  - fixtures/automatic-clowncar-app/source/index.html
189
+ - fixtures/automatic-clowncar-app/source/photos/test-image.jpg
130
190
  - fixtures/automatic-clowncar-app/source/tag.html.erb
191
+ - fixtures/automatic-clowncar-app/source/thumbnail.html.erb
131
192
  - lib/middleman-automatic-clowncar.rb
132
193
  - lib/middleman-automatic-clowncar/extension.rb
194
+ - lib/middleman-automatic-clowncar/sitemap-extension.rb
133
195
  - lib/middleman-automatic-clowncar/thumbnail-generator.rb
196
+ - lib/middleman-automatic-clowncar/thumbnail-resource.rb
134
197
  - lib/middleman-automatic-clowncar/thumbnailer-extension.rb
198
+ - lib/middleman-automatic-clowncar/timestamp-resource.rb
199
+ - lib/middleman-automatic-clowncar/utils.rb
135
200
  - lib/middleman-automatic-clowncar/version.rb
136
201
  - lib/middleman_extension.rb
137
202
  - middleman-automatic-clowncar.gemspec
@@ -139,7 +204,7 @@ homepage: ''
139
204
  licenses:
140
205
  - MIT
141
206
  metadata: {}
142
- post_install_message:
207
+ post_install_message:
143
208
  rdoc_options: []
144
209
  require_paths:
145
210
  - lib
@@ -154,13 +219,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
219
  - !ruby/object:Gem::Version
155
220
  version: '0'
156
221
  requirements: []
157
- rubyforge_project:
158
- rubygems_version: 2.2.0.rc.1
159
- signing_key:
222
+ rubygems_version: 3.0.1
223
+ signing_key:
160
224
  specification_version: 4
161
225
  summary: Automatically generated responsive images for middleman.
162
226
  test_files:
163
227
  - features/clowncar_tag_build.feature
164
228
  - features/clowncar_tag_preview.feature
165
229
  - features/support/env.rb
230
+ - features/support/step_definitions.rb
166
231
  - features/thumbnail_generation.feature