pig 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,6 +2,12 @@ source :gemcutter
2
2
 
3
3
  gem "git", "= 1.2.5"
4
4
 
5
- group :development do
6
- gem "rspec", ">= 1.2.9"
5
+ group :development, :test do
6
+ gem 'ruby-debug', '0.10.3'
7
+ gem 'rspec', '2.0.0.beta.17'
8
+ gem 'rspec-core', '2.0.0.beta.17'
9
+ gem 'rspec-expectations', '2.0.0.beta.17'
10
+ gem 'rspec-mocks', '2.0.0.beta.17'
11
+ gem 'rspec-rails', '2.0.0.beta.17'
12
+ gem 'shoulda', '2.11.1'
7
13
  end
@@ -1,72 +1,45 @@
1
- ---
2
- dependencies:
3
- rspec-core:
4
- group:
5
- - :test
6
- version: = 2.0.0.beta.17
7
- ruby-debug:
8
- group:
9
- - :development
10
- - :test
11
- version: = 0.10.3
12
- shoulda:
13
- group:
14
- - :test
15
- version: = 2.11.1
16
- rspec:
17
- group:
18
- - :test
19
- version: = 2.0.0.beta.17
20
- rspec-expectations:
21
- group:
22
- - :test
23
- version: = 2.0.0.beta.17
24
- rspec-rails:
25
- group:
26
- - :test
27
- version: = 2.0.0.beta.17
28
- git:
29
- group:
30
- - :default
31
- version: = 1.2.5
32
- rspec-mocks:
33
- group:
34
- - :test
35
- version: = 2.0.0.beta.17
36
- specs:
37
- - columnize:
38
- version: 0.3.1
39
- - diff-lcs:
40
- version: 1.1.2
41
- - git:
42
- version: 1.2.5
43
- - linecache:
44
- version: "0.43"
45
- - nokogiri:
46
- version: 1.4.3.1
47
- - rack:
48
- version: 1.2.1
49
- - rack-test:
50
- version: 0.5.4
51
- - rspec-core:
52
- version: 2.0.0.beta.17
53
- - rspec-expectations:
54
- version: 2.0.0.beta.17
55
- - rspec-mocks:
56
- version: 2.0.0.beta.17
57
- - rspec:
58
- version: 2.0.0.beta.17
59
- - webrat:
60
- version: 0.7.1
61
- - rspec-rails:
62
- version: 2.0.0.beta.17
63
- - ruby-debug-base:
64
- version: 0.10.3
65
- - ruby-debug:
66
- version: 0.10.3
67
- - shoulda:
68
- version: 2.11.1
69
- hash: 4084f90b2306051a10d4282e7577b7acc97a8284
70
- sources:
71
- - Rubygems:
72
- uri: http://rubygems.org
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ columnize (0.3.1)
5
+ diff-lcs (1.1.2)
6
+ git (1.2.5)
7
+ linecache (0.43)
8
+ nokogiri (1.4.3.1)
9
+ rack (1.2.1)
10
+ rack-test (0.5.4)
11
+ rack (>= 1.0)
12
+ rspec (2.0.0.beta.17)
13
+ rspec-core (= 2.0.0.beta.17)
14
+ rspec-expectations (= 2.0.0.beta.17)
15
+ rspec-mocks (= 2.0.0.beta.17)
16
+ rspec-core (2.0.0.beta.17)
17
+ rspec-expectations (2.0.0.beta.17)
18
+ diff-lcs (>= 1.1.2)
19
+ rspec-mocks (2.0.0.beta.17)
20
+ rspec-rails (2.0.0.beta.17)
21
+ rspec (>= 2.0.0.beta.14)
22
+ webrat (>= 0.7.0)
23
+ ruby-debug (0.10.3)
24
+ columnize (>= 0.1)
25
+ ruby-debug-base (~> 0.10.3.0)
26
+ ruby-debug-base (0.10.3)
27
+ linecache (>= 0.3)
28
+ shoulda (2.11.1)
29
+ webrat (0.7.1)
30
+ nokogiri (>= 1.2.0)
31
+ rack (>= 1.0)
32
+ rack-test (>= 0.5.3)
33
+
34
+ PLATFORMS
35
+ ruby
36
+
37
+ DEPENDENCIES
38
+ git (= 1.2.5)
39
+ rspec (= 2.0.0.beta.17)
40
+ rspec-core (= 2.0.0.beta.17)
41
+ rspec-expectations (= 2.0.0.beta.17)
42
+ rspec-mocks (= 2.0.0.beta.17)
43
+ rspec-rails (= 2.0.0.beta.17)
44
+ ruby-debug (= 0.10.3)
45
+ shoulda (= 2.11.1)
@@ -0,0 +1,28 @@
1
+ h1. pig
2
+
3
+ h5. A rack endpoint to easily view the latest commits in an environment.
4
+
5
+ The idea was born from a need on a recent project. The solution was inspired by the fine folks at "BendyWorks":http://bendyworks.com while co-working with them in Madison, WI.
6
+
7
+ The pig gem takes its name from the classic story of the chicken and the pig. Many versions of this story exist and are retold with various twists. The base of the story is that the chicken and the pig decide to make a meal of Ham and Eggs (often as part of opening a restaurant), after careful consideration the pig decides against entering the partnership. The concern is that the chicken is involved but the pig would be committed.
8
+
9
+ h2. Usage
10
+
11
+ * Include the gem in your Gemfile.
12
+ * Run the generator.
13
+ bundle exec rails generate pig
14
+ * Start your server
15
+ * Visit '/revision'
16
+
17
+ h3. Note on Patches/Pull Requests
18
+
19
+ * Fork the project.
20
+ * Make your feature addition or bug fix.
21
+ * Add tests for it. This is important so I don't break it in a future version unintentionally.
22
+ * Commit, do not mess with rakefile, version, or history.
23
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
24
+ * Send me a pull request. Bonus points for topic branches.
25
+
26
+ h4. Copyright
27
+
28
+ Copyright (c) 2010 Jim Remsik. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
+ require 'rspec/core/rake_task'
3
4
 
4
5
  begin
5
6
  require 'jeweler'
@@ -17,3 +18,7 @@ begin
17
18
  rescue LoadError
18
19
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
20
  end
21
+
22
+ RSpec::Core::RakeTask.new(:spec)
23
+
24
+ task :default => [:spec]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -2,12 +2,33 @@ require 'rails/generators'
2
2
 
3
3
  class PigGenerator < Rails::Generators::Base
4
4
 
5
+ class_option :revision_path,
6
+ :banner => '/path_to_revisions',
7
+ :default => '/revision',
8
+ :desc => 'A root-relative path at which to display revision information.'
9
+
10
+ class_option :skip_routes,
11
+ :type => :boolean,
12
+ :default => false,
13
+ :desc => 'Do not generate routes.'
14
+
5
15
  def install_pig
6
- route("match '/revision', :to => Pig.new")
16
+ if options[:skip_routes]
17
+ puts 'Nothing to do'
18
+ else
19
+ route("match '#{formatted_revision_path}', :to => Pig.new")
20
+ end
7
21
  end
8
22
 
9
23
  def self.source_root
10
24
  File.join(File.dirname(__FILE__), 'templates')
11
25
  end
12
26
 
27
+ protected
28
+
29
+ def formatted_revision_path
30
+ path = options[:revision_path]
31
+ path.starts_with?('/') ? path : '/#{path}'
32
+ end
33
+
13
34
  end
@@ -5,16 +5,16 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pig}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jim Remsik"]
12
- s.date = %q{2010-08-03}
12
+ s.date = %q{2010-08-20}
13
13
  s.description = %q{A rack endpoint to dynamically view the latest N formatted commits. Pig takes its name from the classic story of the chicken and the pig. Many versions of this idea exist as jokes or anecdotes wherein the two decide to start a restaurant named Ham-n-Eggs. Ultimately, the pig chooses not to participate because he would be committed and the chicken merely involved.}
14
14
  s.email = %q{bigtiger@hashrocket.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.textile"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  "Gemfile",
25
25
  "Gemfile.lock",
26
26
  "LICENSE",
27
- "README.rdoc",
27
+ "README.textile",
28
28
  "Rakefile",
29
29
  "VERSION",
30
30
  "lib/generators/pig/pig_generator.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pig
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jim Remsik
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-03 00:00:00 -04:00
18
+ date: 2010-08-20 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -58,7 +58,7 @@ extensions: []
58
58
 
59
59
  extra_rdoc_files:
60
60
  - LICENSE
61
- - README.rdoc
61
+ - README.textile
62
62
  files:
63
63
  - .document
64
64
  - .gitignore
@@ -67,7 +67,7 @@ files:
67
67
  - Gemfile
68
68
  - Gemfile.lock
69
69
  - LICENSE
70
- - README.rdoc
70
+ - README.textile
71
71
  - Rakefile
72
72
  - VERSION
73
73
  - lib/generators/pig/pig_generator.rb
@@ -1,17 +0,0 @@
1
- = pig
2
-
3
- Description goes here.
4
-
5
- == Note on Patches/Pull Requests
6
-
7
- * Fork the project.
8
- * Make your feature addition or bug fix.
9
- * Add tests for it. This is important so I don't break it in a
10
- future version unintentionally.
11
- * Commit, do not mess with rakefile, version, or history.
12
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
- * Send me a pull request. Bonus points for topic branches.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2010 Jim Remsik. See LICENSE for details.