mergit 1.1.0 → 1.1.1
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 +36 -0
- data/bin/mergit +3 -2
- data/lib/mergit/version.rb +1 -1
- metadata +2 -8
data/README.md
CHANGED
@@ -15,6 +15,38 @@ Some use cases include:
|
|
15
15
|
* Simple tools
|
16
16
|
* Programs that need to work on any ruby without installing gems
|
17
17
|
|
18
|
+
## My original use case
|
19
|
+
|
20
|
+
When I wrote the original mergit, my goal was to distribute development/build
|
21
|
+
scripts to a variety of systems.
|
22
|
+
|
23
|
+
These scripts had the following requirements:
|
24
|
+
|
25
|
+
1. The scripts needed to be easy to install.
|
26
|
+
* Our developers hadn't had experience with Ruby yet. This is before ruby
|
27
|
+
1.9.2 was released!
|
28
|
+
* We didn't have an in-house RPM server (which wouldn't help our Windows
|
29
|
+
systems anyway).
|
30
|
+
2. The scripts needed minimal or no requirements.
|
31
|
+
* Bundler and RVM were new and a pain to automatically install.
|
32
|
+
* Not all systems had the (easy) root access needed to install required
|
33
|
+
gems or build tools.
|
34
|
+
* All the CentOS systems had Ruby (>= 1.8.7 by default)
|
35
|
+
* All the Windows systems could easily get a version of Ruby (a quirk of
|
36
|
+
our development/build environment).
|
37
|
+
* We had a mechanism to get a reasonably current ruby for Solaris.
|
38
|
+
3. The scripts needed to work on Windows, Solaris, and CentOS.
|
39
|
+
4. I wanted to write the scripts with the best practices; unit tests,
|
40
|
+
one-class-per-file, SOLID design.
|
41
|
+
* I needed the scripts to work reliably, so I needed good tests.
|
42
|
+
* It was easier to work on if we followed SOLID design principles.
|
43
|
+
|
44
|
+
The scripts I wrote in the end could be installed on any development or build
|
45
|
+
system via a simple `curl` and only required *any* working ruby of version
|
46
|
+
1.8.7 or greater.
|
47
|
+
|
48
|
+
This was possible because all the `.rb` files were merged into single files, including the one gem I needed (the pure ruby `minitar`).
|
49
|
+
|
18
50
|
## Limitations
|
19
51
|
|
20
52
|
Mergit uses simple text processing, therefore it can be tripped up. Some known problems include:
|
@@ -83,6 +115,10 @@ Simple usage:
|
|
83
115
|
|
84
116
|
For more detailed information, see the [documentation](http://rubydoc.info/gems/mergit/frames).
|
85
117
|
|
118
|
+
## Additional Notes
|
119
|
+
|
120
|
+
To use up less space, you can compress the resulting script with `gzexe`.
|
121
|
+
|
86
122
|
## Contributing
|
87
123
|
|
88
124
|
### Level 1 -- Apprentice
|
data/bin/mergit
CHANGED
@@ -15,7 +15,7 @@ class MergitProgram
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def debug msg
|
18
|
-
$stderr.puts "* debug: #{msg}"
|
18
|
+
$stderr.puts "* debug: #{msg}" if @debug
|
19
19
|
end
|
20
20
|
|
21
21
|
def mergit
|
@@ -71,7 +71,8 @@ class MergitProgram
|
|
71
71
|
arguments = optparse.parse!
|
72
72
|
|
73
73
|
if arguments.size == 0
|
74
|
-
|
74
|
+
puts optparse
|
75
|
+
exit
|
75
76
|
elsif arguments.size > 1
|
76
77
|
err "You can only specify one ruby file to merge at a time."
|
77
78
|
end
|
data/lib/mergit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mergit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -265,18 +265,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
265
265
|
- - ! '>='
|
266
266
|
- !ruby/object:Gem::Version
|
267
267
|
version: '0'
|
268
|
-
segments:
|
269
|
-
- 0
|
270
|
-
hash: -3347449453804380460
|
271
268
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
272
269
|
none: false
|
273
270
|
requirements:
|
274
271
|
- - ! '>='
|
275
272
|
- !ruby/object:Gem::Version
|
276
273
|
version: '0'
|
277
|
-
segments:
|
278
|
-
- 0
|
279
|
-
hash: -3347449453804380460
|
280
274
|
requirements: []
|
281
275
|
rubyforge_project:
|
282
276
|
rubygems_version: 1.8.23
|