devgem 0.0.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.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +33 -0
- data/Rakefile +2 -0
- data/bin/devgem +5 -0
- data/devgem.gemspec +24 -0
- data/lib/devgem/version.rb +3 -0
- data/lib/devgem.rb +60 -0
- metadata +96 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fd4a32b38cc82eb338c0d78995cbd25ed3f0ffa3
|
4
|
+
data.tar.gz: c31c1308057ad4a262362a7843149fe79f3fe00d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 78246927ecfcd192d0a7fdbc4671b5ee7af23a346db0e0027091ef49d7bc6075adf4d8037b57c1d734110af9284eb85b0719cd2c487c3e634ea4a5ed3eac6df6
|
7
|
+
data.tar.gz: d351fe8791a9b1088f23db7a127bfb843f832135cbbc9084202f050661e1be2e1f9b56fa55bde67722f2287d7c68ed96d000aede7fc2d9a575a423218b337f83
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Mahmoud Sakr
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Devgem
|
2
|
+
|
3
|
+
Devgem bundles and installs your under development gem so that you don't have to mess around with paths or bundling/installing everytime you make a change.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem:
|
8
|
+
|
9
|
+
$ gem install devgem
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
After installing, navigate to your gem directory and run the command: `devgem`
|
14
|
+
|
15
|
+
To remove the symlink, simply run `devgem delete` from the gem directory. You might need to `gem uninstall` your gem as well to clean up.
|
16
|
+
|
17
|
+
## What does it really do
|
18
|
+
|
19
|
+
Devgem basically registers your gem as you would normally the first time, via bundle and rake install. It then removes the added source under $GEM_HOME/gems and creates a symlink that points to the current dir again, so your latest version is always there.
|
20
|
+
|
21
|
+
Devgem does a few things
|
22
|
+
|
23
|
+
1. Only works with v0.0.1 (initial development release) (TODO: update to use latest release)
|
24
|
+
2. Uses $GEM_HOME as the directory of your gem home, and assumes your gems are under /gems/ (typical rvm setup)
|
25
|
+
3. Works with only the current dir gem setup (TODO: accept arguments to change this)
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
1. Fork it ( https://github.com/[my-github-username]/devgem/fork )
|
30
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
31
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
32
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
33
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/devgem
ADDED
data/devgem.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'devgem/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "devgem"
|
8
|
+
spec.version = Devgem::VERSION
|
9
|
+
spec.authors = ["Mahmoud Sakr"]
|
10
|
+
spec.email = ["ms@sic-software.com"]
|
11
|
+
spec.summary = %q{Devgem - symlinks your current dir as a bundled gem}
|
12
|
+
spec.description = %q{Devgem - symlinks your current dir as a bundled gem}
|
13
|
+
spec.homepage = "https://github.com/SICSoftwareGmbH/devgem"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = "devgem"
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "thor"
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
end
|
data/lib/devgem.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require "devgem/version"
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
|
5
|
+
module Devgem
|
6
|
+
class CLI < Thor
|
7
|
+
|
8
|
+
default_task :setup
|
9
|
+
|
10
|
+
desc "setup", "Sets current dir as development gem"
|
11
|
+
def setup
|
12
|
+
gempath, currentgem, currentdir, devgem = info
|
13
|
+
|
14
|
+
print "Current gem path: "
|
15
|
+
say gempath, :green
|
16
|
+
|
17
|
+
print "Current gem: "
|
18
|
+
say currentgem, :green
|
19
|
+
|
20
|
+
puts
|
21
|
+
|
22
|
+
# TODO check if valid gem
|
23
|
+
print "Installing gem... "
|
24
|
+
`bundle`
|
25
|
+
`rake install`
|
26
|
+
say "done", :green
|
27
|
+
|
28
|
+
print "Deleting auto-generated gem files... "
|
29
|
+
`rm -rf #{devgem}`
|
30
|
+
say "done", :green
|
31
|
+
|
32
|
+
print "Creating '%s'... " % [devgem]
|
33
|
+
`ln -s #{currentdir} #{devgem}`
|
34
|
+
say "done", :green
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "delete", "Unlinks current gem from development mode"
|
38
|
+
def delete
|
39
|
+
_, _, _, l = info
|
40
|
+
print "Deleting '#{l}'... "
|
41
|
+
`rm l`
|
42
|
+
say "done", :green
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def info
|
51
|
+
gempath = `echo $GEM_HOME`.strip
|
52
|
+
currentgem = `echo ${PWD##*/}`.strip
|
53
|
+
currentdir = `echo $PWD`.strip
|
54
|
+
dest = gempath + "/gems/" + currentgem + "-0.0.1"
|
55
|
+
|
56
|
+
[gempath, currentgem, currentdir, dest]
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: devgem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mahmoud Sakr
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Devgem - symlinks your current dir as a bundled gem
|
56
|
+
email:
|
57
|
+
- ms@sic-software.com
|
58
|
+
executables:
|
59
|
+
- devgem
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- bin/devgem
|
69
|
+
- devgem.gemspec
|
70
|
+
- lib/devgem.rb
|
71
|
+
- lib/devgem/version.rb
|
72
|
+
homepage: https://github.com/SICSoftwareGmbH/devgem
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.2.2
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: Devgem - symlinks your current dir as a bundled gem
|
96
|
+
test_files: []
|