tagit 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.document +5 -0
  2. data/Gemfile +15 -0
  3. data/Gemfile.lock +110 -0
  4. data/LICENSE +20 -0
  5. data/README.markdown +26 -0
  6. data/Rakefile +35 -0
  7. data/VERSION +1 -0
  8. data/app/assets/images/tagit/.gitkeep +0 -0
  9. data/app/assets/javascripts/tagit/application.js +15 -0
  10. data/app/assets/stylesheets/tagit/application.css +13 -0
  11. data/app/controllers/tagit/application_controller.rb +4 -0
  12. data/app/controllers/tagit/versions_controller.rb +18 -0
  13. data/app/helpers/tagit/application_helper.rb +4 -0
  14. data/app/views/layouts/tagit/application.html.erb +14 -0
  15. data/app/views/tagit/versions/current.html.erb +2 -0
  16. data/app/views/tagit/versions/index.html.erb +8 -0
  17. data/config/routes.rb +5 -0
  18. data/lib/tagit.rb +8 -0
  19. data/lib/tagit/engine.rb +5 -0
  20. data/lib/tagit/version.rb +57 -0
  21. data/lib/tasks/tagit_tasks.rake +18 -0
  22. data/script/rails +8 -0
  23. data/spec/dummy/README.rdoc +261 -0
  24. data/spec/dummy/Rakefile +7 -0
  25. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  26. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  27. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  28. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  29. data/spec/dummy/app/mailers/.gitkeep +0 -0
  30. data/spec/dummy/app/models/.gitkeep +0 -0
  31. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  32. data/spec/dummy/config.ru +4 -0
  33. data/spec/dummy/config/application.rb +56 -0
  34. data/spec/dummy/config/boot.rb +10 -0
  35. data/spec/dummy/config/database.yml +25 -0
  36. data/spec/dummy/config/environment.rb +5 -0
  37. data/spec/dummy/config/environments/development.rb +37 -0
  38. data/spec/dummy/config/environments/production.rb +67 -0
  39. data/spec/dummy/config/environments/test.rb +37 -0
  40. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/spec/dummy/config/initializers/inflections.rb +15 -0
  42. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  43. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  44. data/spec/dummy/config/initializers/session_store.rb +8 -0
  45. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  46. data/spec/dummy/config/locales/en.yml +5 -0
  47. data/spec/dummy/config/routes.rb +4 -0
  48. data/spec/dummy/lib/assets/.gitkeep +0 -0
  49. data/spec/dummy/log/.gitkeep +0 -0
  50. data/spec/dummy/log/test.log +0 -0
  51. data/spec/dummy/public/404.html +26 -0
  52. data/spec/dummy/public/422.html +26 -0
  53. data/spec/dummy/public/500.html +25 -0
  54. data/spec/dummy/public/favicon.ico +0 -0
  55. data/spec/dummy/script/rails +6 -0
  56. data/spec/lib/tagit/version_spec.rb +85 -0
  57. data/spec/spec_helper.rb +27 -0
  58. data/tagit.gemspec +112 -0
  59. metadata +174 -0
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,85 @@
1
+ require 'spec_helper'
2
+
3
+ module Tagit
4
+ describe Version do
5
+ describe ".new" do
6
+ context "project-conventional inputs" do
7
+ context "Major/minor" do
8
+ subject { Version.from_s('v0.1') }
9
+
10
+ its(:major) { should eql(0) }
11
+ its(:minor) { should eql(1) }
12
+ its(:patch) { should be_nil }
13
+ its(:to_s) { should eql('v0.1') }
14
+ end
15
+
16
+ context "Major/minor/patch" do
17
+ subject { Version.from_s('v0.1.2') }
18
+
19
+ its(:major) { should eql(0) }
20
+ its(:minor) { should eql(1) }
21
+ its(:patch) { should eql(2) }
22
+ its(:to_s) { should eql('v0.1.2') }
23
+ end
24
+ end
25
+
26
+ context "unconventional inputs" do
27
+ it "should raise ArgumentError" do
28
+ [nil, 'vv0.1', 'production_29345345341', '', ' '].each do |str|
29
+ lambda { Version.new(str) }.should raise_error(ArgumentError)
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ describe "Comparison" do
36
+ specify "Versions should be equal" do
37
+ Version.from_s('v3.2.1').should == Version.from_s('v3.2.1')
38
+ end
39
+
40
+ specify "Version should be bigger than nil" do
41
+ Version.from_s('v0.0').should > nil
42
+ end
43
+
44
+ specify "Version 10 should be bigger than version 2" do
45
+ Version.from_s('v10.1.2').should > Version.from_s('v2.1.2')
46
+ end
47
+
48
+ specify "versions should be equal" do
49
+ Version.from_s('v0.1.2').should == Version.from_s('v0.1.2')
50
+ end
51
+
52
+ specify "versions with bigger minor should win" do
53
+ Version.from_s('v0.2.2').should > Version.from_s('v0.1.45')
54
+ end
55
+
56
+ specify "version 0.9.1 should be bigger than 0.9" do
57
+ Version.from_s('v0.9.1').should > Version.from_s('v0.9')
58
+ end
59
+
60
+ specify "version 0.9 should be smaller than 0.9.1" do
61
+ Version.from_s('v0.9').should < Version.from_s('v0.9.1')
62
+ end
63
+ end
64
+
65
+ describe "Pseudo-finders" do
66
+ before { Version.stub(:git_tags).and_return("v0.1\nv0.2\nv0.3\nproduction_things") }
67
+
68
+ describe ".all" do
69
+ subject { Version.all }
70
+
71
+ it { should be_an(Array) }
72
+ it { should have(3).versions }
73
+ specify { subject.each { |version| version.should be_a(Version) } }
74
+ end
75
+
76
+ describe ".current" do
77
+ subject { Version.current }
78
+
79
+ its(:major) { should eql(0) }
80
+ its(:minor) { should eql(3) }
81
+ its(:patch) { should be_nil }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,27 @@
1
+ spec_dir = File.dirname(__FILE__)
2
+ lib_dir = File.join(spec_dir, '..', 'lib')
3
+
4
+ # Configure Rails Environment
5
+ ENV["RAILS_ENV"] = "test"
6
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
7
+ require "rails/test_help"
8
+ Rails.backtrace_cleaner.remove_silencers!
9
+ # Load support files
10
+
11
+ # Require everything in lib
12
+ Dir[File.join(lib_dir, "**/*.rb")].each {|f| require f}
13
+
14
+ # Requires supporting ruby files with custom matchers and macros, etc,
15
+ # in spec/support/ and its subdirectories.
16
+ Dir[File.join(spec_dir, "spec/support/**/*.rb")].each {|f| require f}
17
+
18
+ RSpec.configure do |config|
19
+ # == Mock Framework
20
+ #
21
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
22
+ #
23
+ # config.mock_with :mocha
24
+ # config.mock_with :flexmock
25
+ # config.mock_with :rr
26
+ config.mock_with :rspec
27
+ end
@@ -0,0 +1,112 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "tagit"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Russell Garner"]
12
+ s.date = "2012-03-15"
13
+ s.description = "Use git to manage your rationally-versioned releases"
14
+ s.email = "rgarner@zephyros-systems.co.uk"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.markdown"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE",
24
+ "README.markdown",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "app/assets/images/tagit/.gitkeep",
28
+ "app/assets/javascripts/tagit/application.js",
29
+ "app/assets/stylesheets/tagit/application.css",
30
+ "app/controllers/tagit/application_controller.rb",
31
+ "app/controllers/tagit/versions_controller.rb",
32
+ "app/helpers/tagit/application_helper.rb",
33
+ "app/views/layouts/tagit/application.html.erb",
34
+ "app/views/tagit/versions/current.html.erb",
35
+ "app/views/tagit/versions/index.html.erb",
36
+ "config/routes.rb",
37
+ "lib/tagit.rb",
38
+ "lib/tagit/engine.rb",
39
+ "lib/tagit/version.rb",
40
+ "lib/tasks/tagit_tasks.rake",
41
+ "script/rails",
42
+ "spec/dummy/README.rdoc",
43
+ "spec/dummy/Rakefile",
44
+ "spec/dummy/app/assets/javascripts/application.js",
45
+ "spec/dummy/app/assets/stylesheets/application.css",
46
+ "spec/dummy/app/controllers/application_controller.rb",
47
+ "spec/dummy/app/helpers/application_helper.rb",
48
+ "spec/dummy/app/mailers/.gitkeep",
49
+ "spec/dummy/app/models/.gitkeep",
50
+ "spec/dummy/app/views/layouts/application.html.erb",
51
+ "spec/dummy/config.ru",
52
+ "spec/dummy/config/application.rb",
53
+ "spec/dummy/config/boot.rb",
54
+ "spec/dummy/config/database.yml",
55
+ "spec/dummy/config/environment.rb",
56
+ "spec/dummy/config/environments/development.rb",
57
+ "spec/dummy/config/environments/production.rb",
58
+ "spec/dummy/config/environments/test.rb",
59
+ "spec/dummy/config/initializers/backtrace_silencers.rb",
60
+ "spec/dummy/config/initializers/inflections.rb",
61
+ "spec/dummy/config/initializers/mime_types.rb",
62
+ "spec/dummy/config/initializers/secret_token.rb",
63
+ "spec/dummy/config/initializers/session_store.rb",
64
+ "spec/dummy/config/initializers/wrap_parameters.rb",
65
+ "spec/dummy/config/locales/en.yml",
66
+ "spec/dummy/config/routes.rb",
67
+ "spec/dummy/lib/assets/.gitkeep",
68
+ "spec/dummy/log/.gitkeep",
69
+ "spec/dummy/log/test.log",
70
+ "spec/dummy/public/404.html",
71
+ "spec/dummy/public/422.html",
72
+ "spec/dummy/public/500.html",
73
+ "spec/dummy/public/favicon.ico",
74
+ "spec/dummy/script/rails",
75
+ "spec/lib/tagit/version_spec.rb",
76
+ "spec/spec_helper.rb",
77
+ "tagit.gemspec"
78
+ ]
79
+ s.homepage = "http://github.com/rgarner/tagit"
80
+ s.licenses = ["MIT"]
81
+ s.require_paths = ["lib"]
82
+ s.rubygems_version = "1.8.16"
83
+ s.summary = "Version your project with git tag"
84
+
85
+ if s.respond_to? :specification_version then
86
+ s.specification_version = 3
87
+
88
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
89
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
90
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
91
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
92
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
93
+ s.add_development_dependency(%q<rspec-rails>, [">= 2.8.0"])
94
+ s.add_development_dependency(%q<rspec>, [">= 2.8.0"])
95
+ else
96
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
97
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
98
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
99
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
100
+ s.add_dependency(%q<rspec-rails>, [">= 2.8.0"])
101
+ s.add_dependency(%q<rspec>, [">= 2.8.0"])
102
+ end
103
+ else
104
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
105
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
106
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
107
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
108
+ s.add_dependency(%q<rspec-rails>, [">= 2.8.0"])
109
+ s.add_dependency(%q<rspec>, [">= 2.8.0"])
110
+ end
111
+ end
112
+
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tagit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Russell Garner
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &2156644080 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.0.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2156644080
25
+ - !ruby/object:Gem::Dependency
26
+ name: rdoc
27
+ requirement: &2156643420 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '3.12'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *2156643420
36
+ - !ruby/object:Gem::Dependency
37
+ name: bundler
38
+ requirement: &2156642700 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.0.0
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *2156642700
47
+ - !ruby/object:Gem::Dependency
48
+ name: jeweler
49
+ requirement: &2156641960 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.8.3
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *2156641960
58
+ - !ruby/object:Gem::Dependency
59
+ name: rspec-rails
60
+ requirement: &2156676780 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: 2.8.0
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *2156676780
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: &2156675260 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 2.8.0
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *2156675260
80
+ description: Use git to manage your rationally-versioned releases
81
+ email: rgarner@zephyros-systems.co.uk
82
+ executables: []
83
+ extensions: []
84
+ extra_rdoc_files:
85
+ - LICENSE
86
+ - README.markdown
87
+ files:
88
+ - .document
89
+ - Gemfile
90
+ - Gemfile.lock
91
+ - LICENSE
92
+ - README.markdown
93
+ - Rakefile
94
+ - VERSION
95
+ - app/assets/images/tagit/.gitkeep
96
+ - app/assets/javascripts/tagit/application.js
97
+ - app/assets/stylesheets/tagit/application.css
98
+ - app/controllers/tagit/application_controller.rb
99
+ - app/controllers/tagit/versions_controller.rb
100
+ - app/helpers/tagit/application_helper.rb
101
+ - app/views/layouts/tagit/application.html.erb
102
+ - app/views/tagit/versions/current.html.erb
103
+ - app/views/tagit/versions/index.html.erb
104
+ - config/routes.rb
105
+ - lib/tagit.rb
106
+ - lib/tagit/engine.rb
107
+ - lib/tagit/version.rb
108
+ - lib/tasks/tagit_tasks.rake
109
+ - script/rails
110
+ - spec/dummy/README.rdoc
111
+ - spec/dummy/Rakefile
112
+ - spec/dummy/app/assets/javascripts/application.js
113
+ - spec/dummy/app/assets/stylesheets/application.css
114
+ - spec/dummy/app/controllers/application_controller.rb
115
+ - spec/dummy/app/helpers/application_helper.rb
116
+ - spec/dummy/app/mailers/.gitkeep
117
+ - spec/dummy/app/models/.gitkeep
118
+ - spec/dummy/app/views/layouts/application.html.erb
119
+ - spec/dummy/config.ru
120
+ - spec/dummy/config/application.rb
121
+ - spec/dummy/config/boot.rb
122
+ - spec/dummy/config/database.yml
123
+ - spec/dummy/config/environment.rb
124
+ - spec/dummy/config/environments/development.rb
125
+ - spec/dummy/config/environments/production.rb
126
+ - spec/dummy/config/environments/test.rb
127
+ - spec/dummy/config/initializers/backtrace_silencers.rb
128
+ - spec/dummy/config/initializers/inflections.rb
129
+ - spec/dummy/config/initializers/mime_types.rb
130
+ - spec/dummy/config/initializers/secret_token.rb
131
+ - spec/dummy/config/initializers/session_store.rb
132
+ - spec/dummy/config/initializers/wrap_parameters.rb
133
+ - spec/dummy/config/locales/en.yml
134
+ - spec/dummy/config/routes.rb
135
+ - spec/dummy/lib/assets/.gitkeep
136
+ - spec/dummy/log/.gitkeep
137
+ - spec/dummy/log/test.log
138
+ - spec/dummy/public/404.html
139
+ - spec/dummy/public/422.html
140
+ - spec/dummy/public/500.html
141
+ - spec/dummy/public/favicon.ico
142
+ - spec/dummy/script/rails
143
+ - spec/lib/tagit/version_spec.rb
144
+ - spec/spec_helper.rb
145
+ - tagit.gemspec
146
+ homepage: http://github.com/rgarner/tagit
147
+ licenses:
148
+ - MIT
149
+ post_install_message:
150
+ rdoc_options: []
151
+ require_paths:
152
+ - lib
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ segments:
160
+ - 0
161
+ hash: -328670112301114602
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ requirements: []
169
+ rubyforge_project:
170
+ rubygems_version: 1.8.16
171
+ signing_key:
172
+ specification_version: 3
173
+ summary: Version your project with git tag
174
+ test_files: []