lorem_casiano 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -49,20 +49,112 @@ This gem describes the way to build a gem using bundler
49
49
 
50
50
  4. vi lib/lorem_casiano.rb. Introduce method ipsum
51
51
 
52
- 5. Fill the TODOs in lorem_casiano.gemspec
52
+ 5. Fill the TODOs and homepage fields in lorem_casiano.gemspec
53
53
  vi lorem_casiano.gemspec
54
54
 
55
55
  6. Generate the gem:
56
56
 
57
- $ gem build lorem_casiano.gemspec
58
- WARNING: no homepage specified
59
- Successfully built RubyGem
60
- Name: lorem_casiano
61
- Version: 0.0.2
62
- File: lorem_casiano-0.0.2.gem
57
+ $ gem build lorem_casiano.gemspec
58
+ Successfully built RubyGem
59
+ Name: lorem_casiano
60
+ Version: 0.0.2
61
+ File: lorem_casiano-0.0.2.gem
63
62
 
64
63
  which generates a file "lorem_casiano-0.0.2.gem"
65
64
 
65
+ 7. Push the gem to rubygems.org
66
+
67
+ $ gem push lorem_casiano-0.0.2.gem
68
+ Pushing gem to https://rubygems.org...
69
+ Successfully registered gem: lorem_casiano (0.0.2)
70
+
71
+ Of course you have to have an account in rubygems.org
72
+
73
+ 8. Lead your browser to "https://rubygems.org/gems/lorem_casiano".
74
+ Your gem must be allocated there
75
+
76
+ 9. The "Gemfile" file has this contents:
77
+
78
+ $ cat Gemfile
79
+ source 'https://rubygems.org'
80
+
81
+ # Specify your gem's dependencies in lorem_casiano.gemspec
82
+ gemspec
83
+
84
+ The "gemspec" leads Bundler to use "lorem_casiano.gemspec"
85
+ to solve the dependencies. This way, there is no need to specify
86
+ dependencies here.
87
+
88
+ 10. $ bundle
89
+ Fetching gem metadata from https://rubygems.org/....
90
+ Installing diff-lcs (1.1.3)
91
+ Using lorem_casiano (0.0.3) from source at /Users/casiano/Dropbox/src/ruby/makingagemwithbundler/lorem_casiano
92
+ Installing rspec-core (2.10.1)
93
+ Installing rspec-expectations (2.10.0)
94
+ Installing rspec-mocks (2.10.1)
95
+ Installing rspec (2.10.0)
96
+ Using bundler (1.1.3)
97
+ Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
98
+
99
+ 10. A new call to bundle recomputes and install the dependencies:
100
+
101
+ $ bundle
102
+ Fetching gem metadata from https://rubygems.org/....
103
+ Installing diff-lcs (1.1.3)
104
+ Using lorem_casiano (0.0.3) from source at /Users/casiano/Dropbox/src/ruby/makingagemwithbundler/lorem_casiano
105
+ Installing rspec-core (2.10.1)
106
+ Installing rspec-expectations (2.10.0)
107
+ Installing rspec-mocks (2.10.1)
108
+ Installing rspec (2.10.0)
109
+ Using bundler (1.1.3)
110
+ Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
111
+
112
+ 11. The Rakefile contains:
113
+
114
+ $ cat Rakefile
115
+ #!/usr/bin/env rake
116
+ require "bundler/gem_tasks"
117
+
118
+ Thes are the tasks that provides:
119
+
120
+ $ rake -T
121
+ rake build # Build lorem_casiano-0.0.3.gem into the pkg directory
122
+ rake install # Build and install lorem_casiano-0.0.3.gem into system gems
123
+ rake release # Create tag v0.0.3 and build and push lorem_casiano-0.0.3.gem to Rubygems
124
+
125
+ 12. Let us see the "build" target:
126
+
127
+ $ rake build
128
+ lorem_casiano 0.0.3 built to pkg/lorem_casiano-0.0.3.gem
129
+
130
+ Now we have this structure:
131
+
132
+ $ tree
133
+ .
134
+ ├── Gemfile
135
+ ├── Gemfile.lock
136
+ ├── LICENSE
137
+ ├── README.md
138
+ ├── Rakefile
139
+ ├── lib
140
+ │   ├── lorem_casiano
141
+ │   │   └── version.rb
142
+ │   └── lorem_casiano.rb
143
+ ├── lorem_casiano-0.0.2.gem
144
+ ├── lorem_casiano.gemspec
145
+ └── pkg
146
+ └── lorem_casiano-0.0.3.gem
147
+
148
+ 13. We can install the gem:
149
+
150
+ $ rake install
151
+ lorem_casiano 0.0.3 built to pkg/lorem_casiano-0.0.3.gem
152
+ lorem_casiano (0.0.3) installed
153
+
154
+ 14. The rake release task creates a tag on GitHub with the version
155
+ of your gem, push the locally committed files to the master on
156
+ GitHub and publishes your gem on RubyGems.org.
157
+ Remember, commit your changes, before run this task.
66
158
 
67
159
  ## Usage
68
160
 
@@ -1,3 +1,3 @@
1
1
  module LoremCasiano
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -8,6 +8,8 @@ Gem::Specification.new do |gem|
8
8
  gem.summary = %q{See README.md for more details}
9
9
  gem.homepage = "https://rubygems.org/gems/lorem_casiano"
10
10
 
11
+ gem.add_development_dependency('rspec')
12
+
11
13
  gem.files = `git ls-files`.split($\)
12
14
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
15
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lorem_casiano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,23 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-06-06 00:00:00.000000000 Z
13
- dependencies: []
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  description: This gem shows how to build a gem using "bundler"
15
31
  email:
16
32
  - casiano.rodriguez.leon@gmail.com