timestamper 0.0.2 → 1.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0.beta.1
data/lib/timestamper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'singleton'
2
- require 'activeresource'
2
+ require 'active_resource'
3
3
  require 'timestamper/timestamper'
4
4
  require 'timestamper/activeresource'
5
5
  require 'timestamper/configuration'
@@ -7,7 +7,7 @@ module ActiveResource
7
7
 
8
8
  private
9
9
  def new_with_timestamper(*args)
10
- returning new_without_timestamper(*args) do |record|
10
+ new_without_timestamper(*args).tap do |record|
11
11
  next if !Timestamper.configuration.reportable?(record.class) # return triggers "LocalJumpError: unexpected return"
12
12
 
13
13
  column = @timestamper_column || Timestamper.configuration.updated_at_column
data/spec/fixtures.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  # testing fixtures
3
3
  class Content < ActiveResource::Base
4
- self.site = ""
4
+ self.site = "http://example.org"
5
5
  end
6
6
  class Article < Content; end
7
7
  class Page < Content; end
data/timestamper.gemspec CHANGED
@@ -1,30 +1,18 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
1
  Gem::Specification.new do |s|
4
- s.name = %q{timestamper}
5
- s.version = "0.0.2"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Dorren Chen"]
9
- s.date = %q{2010-04-14}
10
- s.description = %q{This gem sets Last-Modified in http response header with timestamp extracted from ActiveResource.}
11
- s.email = %q{dorrenchen@gmail.com}
12
- s.extra_rdoc_files = ["README.rdoc", "lib/timestamper.rb", "lib/timestamper/activeresource.rb", "lib/timestamper/configuration.rb", "lib/timestamper/rack_middleware.rb", "lib/timestamper/timestamper.rb"]
13
- s.files = ["README.rdoc", "Rakefile", "lib/timestamper.rb", "lib/timestamper/activeresource.rb", "lib/timestamper/configuration.rb", "lib/timestamper/rack_middleware.rb", "lib/timestamper/timestamper.rb", "spec/fixtures.rb", "spec/lib_specs/activeresource_spec.rb", "spec/lib_specs/configuration_spec.rb", "spec/lib_specs/rack_spec.rb", "spec/lib_specs/timestamper_spec.rb", "spec/spec_helper.rb", "Manifest", "timestamper.gemspec"]
14
- s.homepage = %q{http://github.com/dorren/timestamper}
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Timestamper", "--main", "README.rdoc"]
16
- s.require_paths = ["lib"]
17
- s.rubyforge_project = %q{timestamper}
18
- s.rubygems_version = %q{1.3.6}
19
- s.summary = %q{This gem sets Last-Modified in http response header with timestamp extracted from ActiveResource.}
2
+ s.name = "timestamper"
3
+ s.version = File.read "VERSION"
4
+ s.description = "This gem sets Last-Modified in http response header with timestamp extracted from ActiveResource."
5
+ s.summary = "Last-Modified and ActiveResource combined!"
6
+ s.homepage = "http://github.com/dorren/timestamper"
7
+ s.author = "Dorren Chen"
8
+ s.email = "dorrenchen@gmail.com"
20
9
 
21
- if s.respond_to? :specification_version then
22
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
- s.specification_version = 3
10
+ s.files = Dir["lib/**/*"] << "VERSION" << "timestamper.gemspec" << "README.rdoc"
11
+ s.test_files = Dir["spec/**/*"]
24
12
 
25
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
- else
27
- end
28
- else
29
- end
13
+ s.add_dependency "activeresource", "~> 3.0.0"
14
+ s.add_development_dependency "rack-test"
15
+ s.add_development_dependency "rspec"
16
+ s.add_development_dependency "sinatra"
30
17
  end
18
+
metadata CHANGED
@@ -1,12 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timestamper
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 62196353
5
+ prerelease: 6
5
6
  segments:
7
+ - 1
6
8
  - 0
7
9
  - 0
8
- - 2
9
- version: 0.0.2
10
+ - beta
11
+ - 1
12
+ version: 1.0.0.beta.1
10
13
  platform: ruby
11
14
  authors:
12
15
  - Dorren Chen
@@ -14,74 +17,128 @@ autorequire:
14
17
  bindir: bin
15
18
  cert_chain: []
16
19
 
17
- date: 2010-04-14 00:00:00 -04:00
18
- default_executable:
19
- dependencies: []
20
-
20
+ date: 2011-09-16 00:00:00 Z
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: activeresource
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ hash: 7
31
+ segments:
32
+ - 3
33
+ - 0
34
+ - 0
35
+ version: 3.0.0
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: rack-test
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 0
49
+ version: "0"
50
+ type: :development
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rspec
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: sinatra
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :development
79
+ version_requirements: *id004
21
80
  description: This gem sets Last-Modified in http response header with timestamp extracted from ActiveResource.
22
81
  email: dorrenchen@gmail.com
23
82
  executables: []
24
83
 
25
84
  extensions: []
26
85
 
27
- extra_rdoc_files:
28
- - README.rdoc
29
- - lib/timestamper.rb
30
- - lib/timestamper/activeresource.rb
31
- - lib/timestamper/configuration.rb
32
- - lib/timestamper/rack_middleware.rb
33
- - lib/timestamper/timestamper.rb
86
+ extra_rdoc_files: []
87
+
34
88
  files:
35
- - README.rdoc
36
- - Rakefile
37
- - lib/timestamper.rb
38
89
  - lib/timestamper/activeresource.rb
39
90
  - lib/timestamper/configuration.rb
40
91
  - lib/timestamper/rack_middleware.rb
41
92
  - lib/timestamper/timestamper.rb
93
+ - lib/timestamper.rb
94
+ - VERSION
95
+ - timestamper.gemspec
96
+ - README.rdoc
42
97
  - spec/fixtures.rb
43
98
  - spec/lib_specs/activeresource_spec.rb
44
99
  - spec/lib_specs/configuration_spec.rb
45
100
  - spec/lib_specs/rack_spec.rb
46
101
  - spec/lib_specs/timestamper_spec.rb
47
102
  - spec/spec_helper.rb
48
- - Manifest
49
- - timestamper.gemspec
50
- has_rdoc: true
51
103
  homepage: http://github.com/dorren/timestamper
52
104
  licenses: []
53
105
 
54
106
  post_install_message:
55
- rdoc_options:
56
- - --line-numbers
57
- - --inline-source
58
- - --title
59
- - Timestamper
60
- - --main
61
- - README.rdoc
107
+ rdoc_options: []
108
+
62
109
  require_paths:
63
110
  - lib
64
111
  required_ruby_version: !ruby/object:Gem::Requirement
112
+ none: false
65
113
  requirements:
66
114
  - - ">="
67
115
  - !ruby/object:Gem::Version
116
+ hash: 3
68
117
  segments:
69
118
  - 0
70
119
  version: "0"
71
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
+ none: false
72
122
  requirements:
73
- - - ">="
123
+ - - ">"
74
124
  - !ruby/object:Gem::Version
125
+ hash: 25
75
126
  segments:
76
127
  - 1
77
- - 2
78
- version: "1.2"
128
+ - 3
129
+ - 1
130
+ version: 1.3.1
79
131
  requirements: []
80
132
 
81
- rubyforge_project: timestamper
82
- rubygems_version: 1.3.6
133
+ rubyforge_project:
134
+ rubygems_version: 1.8.6
83
135
  signing_key:
84
136
  specification_version: 3
85
- summary: This gem sets Last-Modified in http response header with timestamp extracted from ActiveResource.
86
- test_files: []
87
-
137
+ summary: Last-Modified and ActiveResource combined!
138
+ test_files:
139
+ - spec/fixtures.rb
140
+ - spec/lib_specs/activeresource_spec.rb
141
+ - spec/lib_specs/configuration_spec.rb
142
+ - spec/lib_specs/rack_spec.rb
143
+ - spec/lib_specs/timestamper_spec.rb
144
+ - spec/spec_helper.rb
data/Manifest DELETED
@@ -1,14 +0,0 @@
1
- README.rdoc
2
- Rakefile
3
- lib/timestamper.rb
4
- lib/timestamper/activeresource.rb
5
- lib/timestamper/configuration.rb
6
- lib/timestamper/rack_middleware.rb
7
- lib/timestamper/timestamper.rb
8
- spec/fixtures.rb
9
- spec/lib_specs/activeresource_spec.rb
10
- spec/lib_specs/configuration_spec.rb
11
- spec/lib_specs/rack_spec.rb
12
- spec/lib_specs/timestamper_spec.rb
13
- spec/spec_helper.rb
14
- Manifest
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'echoe'
4
-
5
- Echoe.new('timestamper', '0.0.2') do |p|
6
- p.description = "This gem sets Last-Modified in http response header with timestamp extracted from ActiveResource."
7
- p.url = "http://github.com/dorren/timestamper"
8
- p.author = "Dorren Chen"
9
- p.email = "dorrenchen@gmail.com"
10
- p.ignore_pattern = ["tmp/*", "script/*"]
11
- p.development_dependencies = []
12
- end