museo 0.1.0
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 +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +1307 -0
- data/.ruby-version +1 -0
- data/.travis.yml +8 -0
- data/Appraisals +10 -0
- data/Gemfile +4 -0
- data/Guardfile +20 -0
- data/README.md +38 -0
- data/Rakefile +38 -0
- data/app/views/layouts/museo/snapshot.html.erb +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/museo +7 -0
- data/gemfiles/rails_4.gemfile +9 -0
- data/gemfiles/rails_4.gemfile.lock +200 -0
- data/gemfiles/rails_5.gemfile +8 -0
- data/gemfiles/rails_5.gemfile.lock +205 -0
- data/lib/museo/cli.rb +67 -0
- data/lib/museo/engine.rb +5 -0
- data/lib/museo/formatter.rb +49 -0
- data/lib/museo/minitest_integration.rb +33 -0
- data/lib/museo/rspec_integration.rb +33 -0
- data/lib/museo/snapshot/minitest.rb +13 -0
- data/lib/museo/snapshot/rspec.rb +13 -0
- data/lib/museo/snapshot.rb +63 -0
- data/lib/museo/test_integration.rb +51 -0
- data/lib/museo/version.rb +3 -0
- data/lib/museo.rb +68 -0
- data/lib/tasks/museo_tasks.rake +1 -0
- data/museo.gemspec +31 -0
- metadata +221 -0
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.5
|
data/.travis.yml
ADDED
data/Appraisals
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
guard :minitest, all_on_start: false do
|
2
|
+
watch(%r{^test/(.*)\/?.*_test\.rb$})
|
3
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
|
4
|
+
watch(%r{^test/test_helper\.rb$}) { "test" }
|
5
|
+
end
|
6
|
+
|
7
|
+
guard :rspec, cmd: "bundle exec rspec", all_on_start: false do
|
8
|
+
require "guard/rspec/dsl"
|
9
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
10
|
+
|
11
|
+
# RSpec files
|
12
|
+
rspec = dsl.rspec
|
13
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
14
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
15
|
+
watch(rspec.spec_files)
|
16
|
+
|
17
|
+
# Ruby files
|
18
|
+
ruby = dsl.ruby
|
19
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
20
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Museo
|
2
|
+
|
3
|
+
[](https://travis-ci.org/danielma/museo)
|
4
|
+
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/museo`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'museo'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install museo
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
TODO: Write usage instructions here
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
32
|
+
|
33
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/museo.
|
38
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
|
3
|
+
begin
|
4
|
+
require "bundler/setup"
|
5
|
+
rescue LoadError
|
6
|
+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
7
|
+
end
|
8
|
+
|
9
|
+
require "rdoc/task"
|
10
|
+
|
11
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
12
|
+
rdoc.rdoc_dir = "rdoc"
|
13
|
+
rdoc.title = "Museo"
|
14
|
+
rdoc.options << "--line-numbers"
|
15
|
+
rdoc.rdoc_files.include("README.rdoc")
|
16
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
17
|
+
end
|
18
|
+
|
19
|
+
Bundler::GemHelper.install_tasks
|
20
|
+
|
21
|
+
require "rake/testtask"
|
22
|
+
|
23
|
+
Rake::TestTask.new(:test) do |t|
|
24
|
+
t.libs << "lib"
|
25
|
+
t.libs << "test"
|
26
|
+
t.pattern = "test/**/*_test.rb"
|
27
|
+
t.verbose = false
|
28
|
+
t.warning = false
|
29
|
+
end
|
30
|
+
|
31
|
+
require "rspec/core/rake_task"
|
32
|
+
|
33
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
34
|
+
t.verbose = false
|
35
|
+
t.pattern = Dir.glob("spec/**/*_spec.rb")
|
36
|
+
end
|
37
|
+
|
38
|
+
task default: %i(test spec)
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "museo"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/museo
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
museo (0.1.0)
|
5
|
+
rails (>= 4, < 5.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (4.2.0)
|
11
|
+
actionpack (= 4.2.0)
|
12
|
+
actionview (= 4.2.0)
|
13
|
+
activejob (= 4.2.0)
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
actionpack (4.2.0)
|
17
|
+
actionview (= 4.2.0)
|
18
|
+
activesupport (= 4.2.0)
|
19
|
+
rack (~> 1.6.0)
|
20
|
+
rack-test (~> 0.6.2)
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
23
|
+
actionview (4.2.0)
|
24
|
+
activesupport (= 4.2.0)
|
25
|
+
builder (~> 3.1)
|
26
|
+
erubis (~> 2.7.0)
|
27
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
29
|
+
activejob (4.2.0)
|
30
|
+
activesupport (= 4.2.0)
|
31
|
+
globalid (>= 0.3.0)
|
32
|
+
activemodel (4.2.0)
|
33
|
+
activesupport (= 4.2.0)
|
34
|
+
builder (~> 3.1)
|
35
|
+
activerecord (4.2.0)
|
36
|
+
activemodel (= 4.2.0)
|
37
|
+
activesupport (= 4.2.0)
|
38
|
+
arel (~> 6.0)
|
39
|
+
activesupport (4.2.0)
|
40
|
+
i18n (~> 0.7)
|
41
|
+
json (~> 1.7, >= 1.7.7)
|
42
|
+
minitest (~> 5.1)
|
43
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
44
|
+
tzinfo (~> 1.1)
|
45
|
+
appraisal (2.1.0)
|
46
|
+
bundler
|
47
|
+
rake
|
48
|
+
thor (>= 0.14.0)
|
49
|
+
arel (6.0.3)
|
50
|
+
ast (2.3.0)
|
51
|
+
awesome_print (1.7.0)
|
52
|
+
builder (3.2.2)
|
53
|
+
coderay (1.1.1)
|
54
|
+
concurrent-ruby (1.0.2)
|
55
|
+
diff-lcs (1.2.5)
|
56
|
+
erubis (2.7.0)
|
57
|
+
ffi (1.9.14)
|
58
|
+
formatador (0.2.5)
|
59
|
+
globalid (0.3.7)
|
60
|
+
activesupport (>= 4.1.0)
|
61
|
+
guard (2.14.0)
|
62
|
+
formatador (>= 0.2.4)
|
63
|
+
listen (>= 2.7, < 4.0)
|
64
|
+
lumberjack (~> 1.0)
|
65
|
+
nenv (~> 0.1)
|
66
|
+
notiffany (~> 0.0)
|
67
|
+
pry (>= 0.9.12)
|
68
|
+
shellany (~> 0.0)
|
69
|
+
thor (>= 0.18.1)
|
70
|
+
guard-compat (1.2.1)
|
71
|
+
guard-minitest (2.4.6)
|
72
|
+
guard-compat (~> 1.2)
|
73
|
+
minitest (>= 3.0)
|
74
|
+
guard-rspec (4.7.3)
|
75
|
+
guard (~> 2.1)
|
76
|
+
guard-compat (~> 1.1)
|
77
|
+
rspec (>= 2.99.0, < 4.0)
|
78
|
+
i18n (0.7.0)
|
79
|
+
json (1.8.3)
|
80
|
+
listen (3.1.5)
|
81
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
82
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
83
|
+
ruby_dep (~> 1.2)
|
84
|
+
loofah (2.0.3)
|
85
|
+
nokogiri (>= 1.5.9)
|
86
|
+
lumberjack (1.0.10)
|
87
|
+
mail (2.6.4)
|
88
|
+
mime-types (>= 1.16, < 4)
|
89
|
+
method_source (0.8.2)
|
90
|
+
mime-types (3.1)
|
91
|
+
mime-types-data (~> 3.2015)
|
92
|
+
mime-types-data (3.2016.0521)
|
93
|
+
mini_portile2 (2.1.0)
|
94
|
+
minitest (5.10.1)
|
95
|
+
nenv (0.3.0)
|
96
|
+
nokogiri (1.6.8.1)
|
97
|
+
mini_portile2 (~> 2.1.0)
|
98
|
+
notiffany (0.1.1)
|
99
|
+
nenv (~> 0.1)
|
100
|
+
shellany (~> 0.0)
|
101
|
+
parser (2.3.3.1)
|
102
|
+
ast (~> 2.2)
|
103
|
+
powerpack (0.1.1)
|
104
|
+
pry (0.10.4)
|
105
|
+
coderay (~> 1.1.0)
|
106
|
+
method_source (~> 0.8.1)
|
107
|
+
slop (~> 3.4)
|
108
|
+
rack (1.6.5)
|
109
|
+
rack-test (0.6.3)
|
110
|
+
rack (>= 1.0)
|
111
|
+
rails (4.2.0)
|
112
|
+
actionmailer (= 4.2.0)
|
113
|
+
actionpack (= 4.2.0)
|
114
|
+
actionview (= 4.2.0)
|
115
|
+
activejob (= 4.2.0)
|
116
|
+
activemodel (= 4.2.0)
|
117
|
+
activerecord (= 4.2.0)
|
118
|
+
activesupport (= 4.2.0)
|
119
|
+
bundler (>= 1.3.0, < 2.0)
|
120
|
+
railties (= 4.2.0)
|
121
|
+
sprockets-rails
|
122
|
+
rails-deprecated_sanitizer (1.0.3)
|
123
|
+
activesupport (>= 4.2.0.alpha)
|
124
|
+
rails-dom-testing (1.0.7)
|
125
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
126
|
+
nokogiri (~> 1.6.0)
|
127
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
128
|
+
rails-html-sanitizer (1.0.3)
|
129
|
+
loofah (~> 2.0)
|
130
|
+
railties (4.2.0)
|
131
|
+
actionpack (= 4.2.0)
|
132
|
+
activesupport (= 4.2.0)
|
133
|
+
rake (>= 0.8.7)
|
134
|
+
thor (>= 0.18.1, < 2.0)
|
135
|
+
rainbow (2.1.0)
|
136
|
+
rake (11.3.0)
|
137
|
+
rb-fsevent (0.9.8)
|
138
|
+
rb-inotify (0.9.7)
|
139
|
+
ffi (>= 0.5.0)
|
140
|
+
rspec (2.99.0)
|
141
|
+
rspec-core (~> 2.99.0)
|
142
|
+
rspec-expectations (~> 2.99.0)
|
143
|
+
rspec-mocks (~> 2.99.0)
|
144
|
+
rspec-collection_matchers (1.1.2)
|
145
|
+
rspec-expectations (>= 2.99.0.beta1)
|
146
|
+
rspec-core (2.99.2)
|
147
|
+
rspec-expectations (2.99.2)
|
148
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
149
|
+
rspec-mocks (2.99.4)
|
150
|
+
rspec-rails (2.99.0)
|
151
|
+
actionpack (>= 3.0)
|
152
|
+
activemodel (>= 3.0)
|
153
|
+
activesupport (>= 3.0)
|
154
|
+
railties (>= 3.0)
|
155
|
+
rspec-collection_matchers
|
156
|
+
rspec-core (~> 2.99.0)
|
157
|
+
rspec-expectations (~> 2.99.0)
|
158
|
+
rspec-mocks (~> 2.99.0)
|
159
|
+
rubocop (0.46.0)
|
160
|
+
parser (>= 2.3.1.1, < 3.0)
|
161
|
+
powerpack (~> 0.1)
|
162
|
+
rainbow (>= 1.99.1, < 3.0)
|
163
|
+
ruby-progressbar (~> 1.7)
|
164
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
165
|
+
ruby-progressbar (1.8.1)
|
166
|
+
ruby_dep (1.5.0)
|
167
|
+
shellany (0.0.1)
|
168
|
+
slop (3.6.0)
|
169
|
+
sprockets (3.7.0)
|
170
|
+
concurrent-ruby (~> 1.0)
|
171
|
+
rack (> 1, < 3)
|
172
|
+
sprockets-rails (3.2.0)
|
173
|
+
actionpack (>= 4.0)
|
174
|
+
activesupport (>= 4.0)
|
175
|
+
sprockets (>= 3.0.0)
|
176
|
+
thor (0.19.4)
|
177
|
+
thread_safe (0.3.5)
|
178
|
+
tzinfo (1.2.2)
|
179
|
+
thread_safe (~> 0.1)
|
180
|
+
unicode-display_width (1.1.2)
|
181
|
+
|
182
|
+
PLATFORMS
|
183
|
+
ruby
|
184
|
+
|
185
|
+
DEPENDENCIES
|
186
|
+
appraisal
|
187
|
+
awesome_print
|
188
|
+
guard
|
189
|
+
guard-minitest
|
190
|
+
guard-rspec
|
191
|
+
museo!
|
192
|
+
pry
|
193
|
+
rails (= 4.2.0)
|
194
|
+
rake (= 11.3.0)
|
195
|
+
rspec (= 2.99)
|
196
|
+
rspec-rails
|
197
|
+
rubocop (~> 0.42)
|
198
|
+
|
199
|
+
BUNDLED WITH
|
200
|
+
1.13.6
|
@@ -0,0 +1,205 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
museo (0.1.0)
|
5
|
+
rails (>= 4, < 5.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actioncable (5.0.0)
|
11
|
+
actionpack (= 5.0.0)
|
12
|
+
nio4r (~> 1.2)
|
13
|
+
websocket-driver (~> 0.6.1)
|
14
|
+
actionmailer (5.0.0)
|
15
|
+
actionpack (= 5.0.0)
|
16
|
+
actionview (= 5.0.0)
|
17
|
+
activejob (= 5.0.0)
|
18
|
+
mail (~> 2.5, >= 2.5.4)
|
19
|
+
rails-dom-testing (~> 2.0)
|
20
|
+
actionpack (5.0.0)
|
21
|
+
actionview (= 5.0.0)
|
22
|
+
activesupport (= 5.0.0)
|
23
|
+
rack (~> 2.0)
|
24
|
+
rack-test (~> 0.6.3)
|
25
|
+
rails-dom-testing (~> 2.0)
|
26
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
+
actionview (5.0.0)
|
28
|
+
activesupport (= 5.0.0)
|
29
|
+
builder (~> 3.1)
|
30
|
+
erubis (~> 2.7.0)
|
31
|
+
rails-dom-testing (~> 2.0)
|
32
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
33
|
+
activejob (5.0.0)
|
34
|
+
activesupport (= 5.0.0)
|
35
|
+
globalid (>= 0.3.6)
|
36
|
+
activemodel (5.0.0)
|
37
|
+
activesupport (= 5.0.0)
|
38
|
+
activerecord (5.0.0)
|
39
|
+
activemodel (= 5.0.0)
|
40
|
+
activesupport (= 5.0.0)
|
41
|
+
arel (~> 7.0)
|
42
|
+
activesupport (5.0.0)
|
43
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
44
|
+
i18n (~> 0.7)
|
45
|
+
minitest (~> 5.1)
|
46
|
+
tzinfo (~> 1.1)
|
47
|
+
appraisal (2.1.0)
|
48
|
+
bundler
|
49
|
+
rake
|
50
|
+
thor (>= 0.14.0)
|
51
|
+
arel (7.1.4)
|
52
|
+
ast (2.3.0)
|
53
|
+
awesome_print (1.7.0)
|
54
|
+
builder (3.2.2)
|
55
|
+
coderay (1.1.1)
|
56
|
+
concurrent-ruby (1.0.2)
|
57
|
+
diff-lcs (1.2.5)
|
58
|
+
erubis (2.7.0)
|
59
|
+
ffi (1.9.14)
|
60
|
+
formatador (0.2.5)
|
61
|
+
globalid (0.3.7)
|
62
|
+
activesupport (>= 4.1.0)
|
63
|
+
guard (2.14.0)
|
64
|
+
formatador (>= 0.2.4)
|
65
|
+
listen (>= 2.7, < 4.0)
|
66
|
+
lumberjack (~> 1.0)
|
67
|
+
nenv (~> 0.1)
|
68
|
+
notiffany (~> 0.0)
|
69
|
+
pry (>= 0.9.12)
|
70
|
+
shellany (~> 0.0)
|
71
|
+
thor (>= 0.18.1)
|
72
|
+
guard-compat (1.2.1)
|
73
|
+
guard-minitest (2.4.6)
|
74
|
+
guard-compat (~> 1.2)
|
75
|
+
minitest (>= 3.0)
|
76
|
+
guard-rspec (4.7.3)
|
77
|
+
guard (~> 2.1)
|
78
|
+
guard-compat (~> 1.1)
|
79
|
+
rspec (>= 2.99.0, < 4.0)
|
80
|
+
i18n (0.7.0)
|
81
|
+
listen (3.1.5)
|
82
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
83
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
84
|
+
ruby_dep (~> 1.2)
|
85
|
+
loofah (2.0.3)
|
86
|
+
nokogiri (>= 1.5.9)
|
87
|
+
lumberjack (1.0.10)
|
88
|
+
mail (2.6.4)
|
89
|
+
mime-types (>= 1.16, < 4)
|
90
|
+
method_source (0.8.2)
|
91
|
+
mime-types (3.1)
|
92
|
+
mime-types-data (~> 3.2015)
|
93
|
+
mime-types-data (3.2016.0521)
|
94
|
+
mini_portile2 (2.1.0)
|
95
|
+
minitest (5.10.1)
|
96
|
+
nenv (0.3.0)
|
97
|
+
nio4r (1.2.1)
|
98
|
+
nokogiri (1.6.8.1)
|
99
|
+
mini_portile2 (~> 2.1.0)
|
100
|
+
notiffany (0.1.1)
|
101
|
+
nenv (~> 0.1)
|
102
|
+
shellany (~> 0.0)
|
103
|
+
parser (2.3.3.1)
|
104
|
+
ast (~> 2.2)
|
105
|
+
powerpack (0.1.1)
|
106
|
+
pry (0.10.4)
|
107
|
+
coderay (~> 1.1.0)
|
108
|
+
method_source (~> 0.8.1)
|
109
|
+
slop (~> 3.4)
|
110
|
+
rack (2.0.1)
|
111
|
+
rack-test (0.6.3)
|
112
|
+
rack (>= 1.0)
|
113
|
+
rails (5.0.0)
|
114
|
+
actioncable (= 5.0.0)
|
115
|
+
actionmailer (= 5.0.0)
|
116
|
+
actionpack (= 5.0.0)
|
117
|
+
actionview (= 5.0.0)
|
118
|
+
activejob (= 5.0.0)
|
119
|
+
activemodel (= 5.0.0)
|
120
|
+
activerecord (= 5.0.0)
|
121
|
+
activesupport (= 5.0.0)
|
122
|
+
bundler (>= 1.3.0, < 2.0)
|
123
|
+
railties (= 5.0.0)
|
124
|
+
sprockets-rails (>= 2.0.0)
|
125
|
+
rails-dom-testing (2.0.1)
|
126
|
+
activesupport (>= 4.2.0, < 6.0)
|
127
|
+
nokogiri (~> 1.6.0)
|
128
|
+
rails-html-sanitizer (1.0.3)
|
129
|
+
loofah (~> 2.0)
|
130
|
+
railties (5.0.0)
|
131
|
+
actionpack (= 5.0.0)
|
132
|
+
activesupport (= 5.0.0)
|
133
|
+
method_source
|
134
|
+
rake (>= 0.8.7)
|
135
|
+
thor (>= 0.18.1, < 2.0)
|
136
|
+
rainbow (2.1.0)
|
137
|
+
rake (12.0.0)
|
138
|
+
rb-fsevent (0.9.8)
|
139
|
+
rb-inotify (0.9.7)
|
140
|
+
ffi (>= 0.5.0)
|
141
|
+
rspec (3.5.0)
|
142
|
+
rspec-core (~> 3.5.0)
|
143
|
+
rspec-expectations (~> 3.5.0)
|
144
|
+
rspec-mocks (~> 3.5.0)
|
145
|
+
rspec-core (3.5.4)
|
146
|
+
rspec-support (~> 3.5.0)
|
147
|
+
rspec-expectations (3.5.0)
|
148
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
149
|
+
rspec-support (~> 3.5.0)
|
150
|
+
rspec-mocks (3.5.0)
|
151
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
+
rspec-support (~> 3.5.0)
|
153
|
+
rspec-rails (3.5.2)
|
154
|
+
actionpack (>= 3.0)
|
155
|
+
activesupport (>= 3.0)
|
156
|
+
railties (>= 3.0)
|
157
|
+
rspec-core (~> 3.5.0)
|
158
|
+
rspec-expectations (~> 3.5.0)
|
159
|
+
rspec-mocks (~> 3.5.0)
|
160
|
+
rspec-support (~> 3.5.0)
|
161
|
+
rspec-support (3.5.0)
|
162
|
+
rubocop (0.46.0)
|
163
|
+
parser (>= 2.3.1.1, < 3.0)
|
164
|
+
powerpack (~> 0.1)
|
165
|
+
rainbow (>= 1.99.1, < 3.0)
|
166
|
+
ruby-progressbar (~> 1.7)
|
167
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
168
|
+
ruby-progressbar (1.8.1)
|
169
|
+
ruby_dep (1.5.0)
|
170
|
+
shellany (0.0.1)
|
171
|
+
slop (3.6.0)
|
172
|
+
sprockets (3.7.0)
|
173
|
+
concurrent-ruby (~> 1.0)
|
174
|
+
rack (> 1, < 3)
|
175
|
+
sprockets-rails (3.2.0)
|
176
|
+
actionpack (>= 4.0)
|
177
|
+
activesupport (>= 4.0)
|
178
|
+
sprockets (>= 3.0.0)
|
179
|
+
thor (0.19.4)
|
180
|
+
thread_safe (0.3.5)
|
181
|
+
tzinfo (1.2.2)
|
182
|
+
thread_safe (~> 0.1)
|
183
|
+
unicode-display_width (1.1.2)
|
184
|
+
websocket-driver (0.6.4)
|
185
|
+
websocket-extensions (>= 0.1.0)
|
186
|
+
websocket-extensions (0.1.2)
|
187
|
+
|
188
|
+
PLATFORMS
|
189
|
+
ruby
|
190
|
+
|
191
|
+
DEPENDENCIES
|
192
|
+
appraisal
|
193
|
+
awesome_print
|
194
|
+
guard
|
195
|
+
guard-minitest
|
196
|
+
guard-rspec
|
197
|
+
museo!
|
198
|
+
pry
|
199
|
+
rails (= 5.0.0)
|
200
|
+
rspec (= 3.5.0)
|
201
|
+
rspec-rails
|
202
|
+
rubocop (~> 0.42)
|
203
|
+
|
204
|
+
BUNDLED WITH
|
205
|
+
1.13.6
|
data/lib/museo/cli.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
module Museo
|
2
|
+
class CLI
|
3
|
+
def initialize(command = nil, *argv)
|
4
|
+
case command.to_s.strip.downcase
|
5
|
+
when "clear"
|
6
|
+
clear(argv.first)
|
7
|
+
when "list"
|
8
|
+
list(argv.first)
|
9
|
+
when ""
|
10
|
+
puts "Please add a command"
|
11
|
+
else
|
12
|
+
puts "Don't know how to do command: #{command}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def list(matcher)
|
17
|
+
directory = find_directory(matcher)
|
18
|
+
|
19
|
+
if File.directory?(directory)
|
20
|
+
puts "Directory: #{directory}\n\n"
|
21
|
+
list_files(directory)
|
22
|
+
else
|
23
|
+
puts "No directory found: #{directory}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def clear(matcher)
|
28
|
+
list(matcher)
|
29
|
+
directory_to_clear = find_directory(matcher)
|
30
|
+
|
31
|
+
return unless File.directory?(directory_to_clear)
|
32
|
+
|
33
|
+
puts "Removing snapshots"
|
34
|
+
FileUtils.remove_dir(directory_to_clear)
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def find_directory(matcher_or_pathname)
|
40
|
+
return matcher_or_pathname if matcher_or_pathname.is_a?(Pathname)
|
41
|
+
|
42
|
+
Museo.pathname(matcher_or_pathname)
|
43
|
+
end
|
44
|
+
|
45
|
+
def files(matcher)
|
46
|
+
directory = find_directory(matcher)
|
47
|
+
|
48
|
+
return [] unless directory
|
49
|
+
|
50
|
+
Dir[directory.join("**", "*.snapshot")].map do |snapshot|
|
51
|
+
Pathname.new(snapshot)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def list_files(directory)
|
56
|
+
files = files(directory)
|
57
|
+
|
58
|
+
if files.any?
|
59
|
+
files.each do |path|
|
60
|
+
puts path.relative_path_from(directory)
|
61
|
+
end
|
62
|
+
else
|
63
|
+
puts "No files"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|