ofe 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +9 -7
- data/Gemfile.lock +90 -0
- data/Rakefile +82 -17
- data/VERSION +1 -0
- data/lib/ofe.rb +26 -3
- data/ofe.gemspec +4 -2
- data/ofe.json +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 000b53881f26bb970761cf112b489b11ffc2ee3c
|
4
|
+
data.tar.gz: 8b6bd38da53929008c54fa95d8d8eeead2ee858c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be3adcba1329fb7a87cf6b62e742bd7f9fdbb33c9ad1890ae2fbe672d46ebe91bff4752fa57181ca9acc4dcf8d63f75f9caa0b77ab47ecfd8490c53f5c44b1be
|
7
|
+
data.tar.gz: 967d6c922368bbd5d7ce266e3e09080fc5f9c0c3c80f9fa08353d1fd57ae64f94597dd3c839d48f28dbcabc268998a36d05403b981a1195bd193731ced683464
|
data/Gemfile
CHANGED
@@ -7,13 +7,15 @@
|
|
7
7
|
# ------------------------------------------------
|
8
8
|
source "https://rubygems.org"
|
9
9
|
|
10
|
-
# ------------------------------------------------
|
11
|
-
# RUBY -------------------------------------------
|
12
|
-
# ------------------------------------------------
|
13
|
-
ruby "2.1.1"
|
14
|
-
|
15
10
|
# ------------------------------------------------
|
16
11
|
# GEMS -------------------------------------------
|
17
12
|
# ------------------------------------------------
|
18
|
-
|
19
|
-
|
13
|
+
group :development do
|
14
|
+
gem "shoulda", ">= 0"
|
15
|
+
gem "rdoc", "~> 3.12"
|
16
|
+
gem "yard", "~> 0.7"
|
17
|
+
gem "bundler", "~> 1.0"
|
18
|
+
gem "jeweler", "~> 2.0.1"
|
19
|
+
gem "simplecov", ">= 0"
|
20
|
+
gem "pry"
|
21
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.2.1)
|
5
|
+
i18n (~> 0.7)
|
6
|
+
json (~> 1.7, >= 1.7.7)
|
7
|
+
minitest (~> 5.1)
|
8
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
9
|
+
tzinfo (~> 1.1)
|
10
|
+
addressable (2.3.8)
|
11
|
+
builder (3.2.2)
|
12
|
+
coderay (1.1.0)
|
13
|
+
descendants_tracker (0.0.4)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
15
|
+
docile (1.1.5)
|
16
|
+
faraday (0.9.1)
|
17
|
+
multipart-post (>= 1.2, < 3)
|
18
|
+
git (1.2.9.1)
|
19
|
+
github_api (0.12.3)
|
20
|
+
addressable (~> 2.3)
|
21
|
+
descendants_tracker (~> 0.0.4)
|
22
|
+
faraday (~> 0.8, < 0.10)
|
23
|
+
hashie (>= 3.3)
|
24
|
+
multi_json (>= 1.7.5, < 2.0)
|
25
|
+
nokogiri (~> 1.6.3)
|
26
|
+
oauth2
|
27
|
+
hashie (3.4.2)
|
28
|
+
highline (1.7.2)
|
29
|
+
i18n (0.7.0)
|
30
|
+
jeweler (2.0.1)
|
31
|
+
builder
|
32
|
+
bundler (>= 1.0)
|
33
|
+
git (>= 1.2.5)
|
34
|
+
github_api
|
35
|
+
highline (>= 1.6.15)
|
36
|
+
nokogiri (>= 1.5.10)
|
37
|
+
rake
|
38
|
+
rdoc
|
39
|
+
json (1.8.3)
|
40
|
+
jwt (1.5.0)
|
41
|
+
method_source (0.8.2)
|
42
|
+
mini_portile (0.6.2)
|
43
|
+
minitest (5.7.0)
|
44
|
+
multi_json (1.11.1)
|
45
|
+
multi_xml (0.5.5)
|
46
|
+
multipart-post (2.0.0)
|
47
|
+
nokogiri (1.6.6.2)
|
48
|
+
mini_portile (~> 0.6.0)
|
49
|
+
oauth2 (1.0.0)
|
50
|
+
faraday (>= 0.8, < 0.10)
|
51
|
+
jwt (~> 1.0)
|
52
|
+
multi_json (~> 1.3)
|
53
|
+
multi_xml (~> 0.5)
|
54
|
+
rack (~> 1.2)
|
55
|
+
pry (0.10.1)
|
56
|
+
coderay (~> 1.1.0)
|
57
|
+
method_source (~> 0.8.1)
|
58
|
+
slop (~> 3.4)
|
59
|
+
rack (1.6.1)
|
60
|
+
rake (10.4.2)
|
61
|
+
rdoc (3.12.2)
|
62
|
+
json (~> 1.4)
|
63
|
+
shoulda (3.5.0)
|
64
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
65
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
66
|
+
shoulda-context (1.2.1)
|
67
|
+
shoulda-matchers (2.8.0)
|
68
|
+
activesupport (>= 3.0.0)
|
69
|
+
simplecov (0.10.0)
|
70
|
+
docile (~> 1.1.0)
|
71
|
+
json (~> 1.8)
|
72
|
+
simplecov-html (~> 0.10.0)
|
73
|
+
simplecov-html (0.10.0)
|
74
|
+
slop (3.6.0)
|
75
|
+
thread_safe (0.3.5)
|
76
|
+
tzinfo (1.2.2)
|
77
|
+
thread_safe (~> 0.1)
|
78
|
+
yard (0.8.7.6)
|
79
|
+
|
80
|
+
PLATFORMS
|
81
|
+
ruby
|
82
|
+
|
83
|
+
DEPENDENCIES
|
84
|
+
bundler (~> 1.0)
|
85
|
+
jeweler (~> 2.0.1)
|
86
|
+
pry
|
87
|
+
rdoc (~> 3.12)
|
88
|
+
shoulda
|
89
|
+
simplecov
|
90
|
+
yard (~> 0.7)
|
data/Rakefile
CHANGED
@@ -1,30 +1,95 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
1
|
+
#require 'rubygems'
|
2
|
+
#require 'rake'
|
3
3
|
|
4
|
-
desc "Tests ofe gem"
|
4
|
+
#desc "Tests ofe gem"
|
5
5
|
|
6
|
-
task :test do
|
7
|
-
|
8
|
-
end
|
6
|
+
#task :test do
|
7
|
+
##sh "rspec spec/ofe_spec.rb"
|
8
|
+
#end
|
9
|
+
|
10
|
+
#desc "Uninstalls ofe gem and executables"
|
11
|
+
|
12
|
+
#task :uninstall do
|
13
|
+
#sh "gem uninstall ofe --executables"
|
14
|
+
#end
|
15
|
+
|
16
|
+
#desc "Builds ofe gem"
|
17
|
+
|
18
|
+
#task :build do
|
19
|
+
#sh "gem build ofe.gemspec"
|
20
|
+
#end
|
21
|
+
|
22
|
+
#desc "Installs ofe gem"
|
23
|
+
|
24
|
+
#task :install do
|
25
|
+
#sh "gem install ofe-0.0.0.gem"
|
26
|
+
#end
|
9
27
|
|
10
|
-
desc "Uninstalls ofe gem
|
28
|
+
#desc "Uninstalls, Builds, and Installs ofe gem"
|
11
29
|
|
12
|
-
task :uninstall
|
13
|
-
|
30
|
+
#task :default => [:uninstall, :build, :install]
|
31
|
+
# encoding: utf-8
|
32
|
+
|
33
|
+
require 'rubygems'
|
34
|
+
require 'bundler'
|
35
|
+
begin
|
36
|
+
Bundler.setup(:default, :development)
|
37
|
+
rescue Bundler::BundlerError => e
|
38
|
+
$stderr.puts e.message
|
39
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
40
|
+
exit e.status_code
|
14
41
|
end
|
42
|
+
require 'rake'
|
43
|
+
|
44
|
+
require 'jeweler'
|
45
|
+
Jeweler::Tasks.new do |gem|
|
46
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
47
|
+
gem.name = "ofe"
|
48
|
+
gem.homepage = "https://github.com/eriknomitch/ofe"
|
49
|
+
gem.summary = %Q{Open For Editing}
|
50
|
+
gem.description = "Open For Editing: CLI Gem which opens specified files (ofe.json) for editing in your text editor."
|
51
|
+
gem.email = "erik@nomitch.com"
|
52
|
+
gem.authors = ["Erik Nomitch"]
|
53
|
+
gem.license = "GPL-2"
|
54
|
+
gem.licenses = ["GPL-2"]
|
55
|
+
gem.date = "2014-09-27"
|
56
|
+
gem.post_install_message = <<-EOS
|
57
|
+
---------------------------------------------------------------
|
58
|
+
If you have not done so, you will need to set your EDITOR
|
59
|
+
environment variable (usually in ~/.bashrc or ~/.zshrc).
|
15
60
|
|
16
|
-
|
61
|
+
Example:
|
17
62
|
|
18
|
-
|
19
|
-
|
63
|
+
export EDITOR=vim
|
64
|
+
---------------------------------------------------------------
|
65
|
+
EOS
|
66
|
+
|
67
|
+
#s.files = `git ls-files`.split("\n")
|
68
|
+
# dependencies defined in Gemfile
|
20
69
|
end
|
70
|
+
Jeweler::RubygemsDotOrgTasks.new
|
21
71
|
|
22
|
-
|
72
|
+
require 'rake/testtask'
|
73
|
+
Rake::TestTask.new(:test) do |test|
|
74
|
+
test.libs << 'lib' << 'test'
|
75
|
+
test.pattern = 'test/**/test_*.rb'
|
76
|
+
test.verbose = true
|
77
|
+
end
|
23
78
|
|
24
|
-
|
25
|
-
|
79
|
+
desc "Code coverage detail"
|
80
|
+
task :simplecov do
|
81
|
+
ENV['COVERAGE'] = "true"
|
82
|
+
Rake::Task['test'].execute
|
26
83
|
end
|
27
84
|
|
28
|
-
|
85
|
+
task :default => :test
|
29
86
|
|
30
|
-
task
|
87
|
+
require 'rdoc/task'
|
88
|
+
Rake::RDocTask.new do |rdoc|
|
89
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
90
|
+
|
91
|
+
rdoc.rdoc_dir = 'rdoc'
|
92
|
+
rdoc.title = "ofe #{version}"
|
93
|
+
rdoc.rdoc_files.include('README*')
|
94
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
95
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/lib/ofe.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
require "json"
|
5
5
|
require "shellwords"
|
6
6
|
require "tsort"
|
7
|
+
require "readline"
|
7
8
|
|
8
9
|
require "ofe/t_sorted_files"
|
9
10
|
|
@@ -61,10 +62,14 @@ module Ofe
|
|
61
62
|
puts JSON.pretty_generate(to_puts)
|
62
63
|
end
|
63
64
|
|
64
|
-
def self.
|
65
|
+
def self.group_names
|
65
66
|
require_and_parse_config_file
|
66
67
|
|
67
|
-
|
68
|
+
@@config_json.keys
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.list_group_names
|
72
|
+
puts group_names
|
68
73
|
end
|
69
74
|
|
70
75
|
def self.make_example_config_file
|
@@ -166,7 +171,25 @@ module Ofe
|
|
166
171
|
def self.get_group
|
167
172
|
return :default if ARGV.count == 0
|
168
173
|
|
169
|
-
ARGV.first
|
174
|
+
group_match = ARGV.first
|
175
|
+
|
176
|
+
# Return the group if we have an exact match
|
177
|
+
return group_match.to_sym if group_names.member? group_match
|
178
|
+
|
179
|
+
# Otherwise, try to fuzzy match
|
180
|
+
group_names.each do |group_name|
|
181
|
+
if group_name.start_with? group_match
|
182
|
+
printf "Fuzzy matched group '#{group_name}'. Press ENTER to open: "
|
183
|
+
begin
|
184
|
+
Readline.readline
|
185
|
+
return group_name.to_sym
|
186
|
+
rescue Interrupt
|
187
|
+
exit 0
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
raise "Group '#{group_match}' was not found."
|
170
193
|
end
|
171
194
|
|
172
195
|
def self.format_files_to_open(files)
|
data/ofe.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ofe 0.1.
|
5
|
+
# stub: ofe 0.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ofe"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -21,9 +21,11 @@ Gem::Specification.new do |s|
|
|
21
21
|
]
|
22
22
|
s.files = [
|
23
23
|
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
24
25
|
"LICENSE",
|
25
26
|
"README.md",
|
26
27
|
"Rakefile",
|
28
|
+
"VERSION",
|
27
29
|
"bin/ofe",
|
28
30
|
"lib/ofe.rb",
|
29
31
|
"lib/ofe/t_sorted_files.rb",
|
data/ofe.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ofe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Nomitch
|
@@ -119,9 +119,11 @@ extra_rdoc_files:
|
|
119
119
|
- README.md
|
120
120
|
files:
|
121
121
|
- Gemfile
|
122
|
+
- Gemfile.lock
|
122
123
|
- LICENSE
|
123
124
|
- README.md
|
124
125
|
- Rakefile
|
126
|
+
- VERSION
|
125
127
|
- bin/ofe
|
126
128
|
- lib/ofe.rb
|
127
129
|
- lib/ofe/t_sorted_files.rb
|