selfiegram 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +47 -0
- data/Guardfile +33 -0
- data/VERSION +1 -1
- data/bin/selfie +64 -1
- data/lib/actionable/actionable.rb +15 -0
- data/lib/background_images/downloader.rb +10 -7
- data/lib/runner/options/options.rb +58 -0
- data/lib/runner/runner.rb +15 -0
- data/lib/selfiegram.rb +52 -8
- data/selfiegram.gemspec +17 -5
- data/selfies/people/brett.png +0 -0
- data/selfies/people/brettcassette.png +0 -0
- data/spec/spec_helper.rb +5 -0
- metadata +38 -4
- data/test/helper.rb +0 -34
- data/test/test_selfiegram.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf341c8b3b0c555cc54e35f1e538e599820898f2
|
4
|
+
data.tar.gz: d03fe87ca610eb1ffd3d399b9ffdda3b83aea5f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f3307a4e8a7c3917ac53923ccdb98c5dfa20c38d27cc287fcd9358dca0a363ce5e0365eb93b7823164065205aba2b70d9966adf812d6fea9f61a00e6023e448
|
7
|
+
data.tar.gz: 46c2f793269b8080efd84b12184dc463e2b3299feb21ffe157397579afaf7a59a3c45e3f38357a95cf3aa6d15f17e421badf4dd8c51e0bde0958840d74db7833
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,11 +9,17 @@ GEM
|
|
9
9
|
tzinfo (~> 1.1)
|
10
10
|
addressable (2.3.6)
|
11
11
|
builder (3.2.2)
|
12
|
+
celluloid (0.16.0)
|
13
|
+
timers (~> 4.0.0)
|
14
|
+
coderay (1.1.0)
|
12
15
|
descendants_tracker (0.0.4)
|
13
16
|
thread_safe (~> 0.3, >= 0.3.1)
|
17
|
+
diff-lcs (1.2.5)
|
14
18
|
docile (1.1.5)
|
15
19
|
faraday (0.9.0)
|
16
20
|
multipart-post (>= 1.2, < 3)
|
21
|
+
ffi (1.9.5)
|
22
|
+
formatador (0.2.5)
|
17
23
|
git (1.2.7)
|
18
24
|
github_api (0.11.3)
|
19
25
|
addressable (~> 2.3)
|
@@ -23,8 +29,18 @@ GEM
|
|
23
29
|
multi_json (>= 1.7.5, < 2.0)
|
24
30
|
nokogiri (~> 1.6.0)
|
25
31
|
oauth2
|
32
|
+
guard (2.6.1)
|
33
|
+
formatador (>= 0.2.4)
|
34
|
+
listen (~> 2.7)
|
35
|
+
lumberjack (~> 1.0)
|
36
|
+
pry (>= 0.9.12)
|
37
|
+
thor (>= 0.18.1)
|
38
|
+
guard-rspec (4.3.1)
|
39
|
+
guard (~> 2.1)
|
40
|
+
rspec (>= 2.14, < 4.0)
|
26
41
|
hashie (3.2.0)
|
27
42
|
highline (1.6.21)
|
43
|
+
hitimes (1.2.2)
|
28
44
|
i18n (0.6.11)
|
29
45
|
jeweler (2.0.1)
|
30
46
|
builder
|
@@ -37,6 +53,12 @@ GEM
|
|
37
53
|
rdoc
|
38
54
|
json (1.8.1)
|
39
55
|
jwt (1.0.0)
|
56
|
+
listen (2.7.9)
|
57
|
+
celluloid (>= 0.15.2)
|
58
|
+
rb-fsevent (>= 0.9.3)
|
59
|
+
rb-inotify (>= 0.9)
|
60
|
+
lumberjack (1.0.9)
|
61
|
+
method_source (0.8.2)
|
40
62
|
mini_portile (0.6.0)
|
41
63
|
minitest (5.4.2)
|
42
64
|
multi_json (1.10.1)
|
@@ -50,11 +72,30 @@ GEM
|
|
50
72
|
multi_json (~> 1.3)
|
51
73
|
multi_xml (~> 0.5)
|
52
74
|
rack (~> 1.2)
|
75
|
+
pry (0.10.1)
|
76
|
+
coderay (~> 1.1.0)
|
77
|
+
method_source (~> 0.8.1)
|
78
|
+
slop (~> 3.4)
|
53
79
|
rack (1.5.2)
|
54
80
|
rake (10.3.2)
|
81
|
+
rb-fsevent (0.9.4)
|
82
|
+
rb-inotify (0.9.5)
|
83
|
+
ffi (>= 0.5.0)
|
55
84
|
rdoc (3.12.2)
|
56
85
|
json (~> 1.4)
|
57
86
|
rmagick (2.13.3)
|
87
|
+
rspec (3.1.0)
|
88
|
+
rspec-core (~> 3.1.0)
|
89
|
+
rspec-expectations (~> 3.1.0)
|
90
|
+
rspec-mocks (~> 3.1.0)
|
91
|
+
rspec-core (3.1.5)
|
92
|
+
rspec-support (~> 3.1.0)
|
93
|
+
rspec-expectations (3.1.2)
|
94
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
+
rspec-support (~> 3.1.0)
|
96
|
+
rspec-mocks (3.1.2)
|
97
|
+
rspec-support (~> 3.1.0)
|
98
|
+
rspec-support (3.1.1)
|
58
99
|
shoulda (3.5.0)
|
59
100
|
shoulda-context (~> 1.0, >= 1.0.1)
|
60
101
|
shoulda-matchers (>= 1.4.1, < 3.0)
|
@@ -66,7 +107,11 @@ GEM
|
|
66
107
|
multi_json
|
67
108
|
simplecov-html (~> 0.8.0)
|
68
109
|
simplecov-html (0.8.0)
|
110
|
+
slop (3.6.0)
|
111
|
+
thor (0.19.1)
|
69
112
|
thread_safe (0.3.4)
|
113
|
+
timers (4.0.1)
|
114
|
+
hitimes
|
70
115
|
tzinfo (1.2.2)
|
71
116
|
thread_safe (~> 0.1)
|
72
117
|
|
@@ -75,8 +120,10 @@ PLATFORMS
|
|
75
120
|
|
76
121
|
DEPENDENCIES
|
77
122
|
bundler (~> 1.0)
|
123
|
+
guard-rspec
|
78
124
|
jeweler (~> 2.0.1)
|
79
125
|
rdoc (~> 3.12)
|
80
126
|
rmagick
|
127
|
+
rspec
|
81
128
|
shoulda
|
82
129
|
simplecov
|
data/Guardfile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
5
|
+
# rspec may be run, below are examples of the most common uses.
|
6
|
+
# * bundler: 'bundle exec rspec'
|
7
|
+
# * bundler binstubs: 'bin/rspec'
|
8
|
+
# * spring: 'bin/rsspec' (This will use spring if running and you have
|
9
|
+
# installed the spring binstubs per the docs)
|
10
|
+
# * zeus: 'zeus rspec' (requires the server to be started separetly)
|
11
|
+
# * 'just' rspec: 'rspec'
|
12
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
13
|
+
watch(%r{^spec/.+_spec\.rb$})
|
14
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
15
|
+
watch('spec/spec_helper.rb') { "spec" }
|
16
|
+
|
17
|
+
# Rails example
|
18
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
19
|
+
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
20
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
21
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
22
|
+
watch('config/routes.rb') { "spec/routing" }
|
23
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
24
|
+
watch('spec/rails_helper.rb') { "spec" }
|
25
|
+
|
26
|
+
# Capybara features specs
|
27
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
28
|
+
|
29
|
+
# Turnip features and steps
|
30
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
31
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
32
|
+
end
|
33
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/bin/selfie
CHANGED
@@ -1,5 +1,68 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require "optparse"
|
4
|
+
require "pathname"
|
5
|
+
|
3
6
|
Dir[File.expand_path(File.join(__FILE__, "../../lib/**/*.rb"))].each { |f| require f }
|
4
7
|
|
5
|
-
|
8
|
+
options = {
|
9
|
+
:action => :snap
|
10
|
+
}
|
11
|
+
|
12
|
+
OptionParser.new do |opts|
|
13
|
+
opts.banner = "Usage: selfie [options] magic string"
|
14
|
+
|
15
|
+
opts.on("-u [USER]", "--user", String, "User (e.g. brettcassette)") do |user|
|
16
|
+
options[:user] = user
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on("-p [PATH]", "--path", String, "Path (e.g. /path/to/file)") do |path|
|
20
|
+
options[:path] = Pathname.new(path).expand_path.to_s
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on("-o [OUTPUT]", "--output", String, "Output path (e.g. /path/to/output)") do |output|
|
24
|
+
options[:output] = Pathname.new(output).expand_path.to_s
|
25
|
+
end
|
26
|
+
|
27
|
+
opts.on("-d", "--[no]-dry-run", "Dry Run (do not create files)") do |dry_run|
|
28
|
+
options[:dry_run] = dry_run
|
29
|
+
end
|
30
|
+
|
31
|
+
opts.on("-m MAGIC", "--magic", String, "Magic String (e.g. 'Bob Dole', 'The Catcher in the Rye')") do |magic|
|
32
|
+
options[:magic] = magic.to_s
|
33
|
+
end
|
34
|
+
|
35
|
+
opts.on("-a USERNAME", "--adduser", String, "Username to add. Must be coupled with --image") do |username|
|
36
|
+
options[:action] = :add_user
|
37
|
+
options[:user] = username
|
38
|
+
end
|
39
|
+
|
40
|
+
opts.on("-i IMAGE", "--image", String, "Image to assign to username") do |image|
|
41
|
+
options[:image] = Pathname.new(image).expand_path.to_s
|
42
|
+
end
|
43
|
+
|
44
|
+
opts.on("-v", "--[no]-verbose", "Verbose") do |verbose|
|
45
|
+
options[:verbose] = true
|
46
|
+
end
|
47
|
+
end.parse!
|
48
|
+
|
49
|
+
if options[:action] == :snap
|
50
|
+
if options[:magic].nil?
|
51
|
+
puts "Cannot create a selfie if I don't know what of! Use the -m (--magic) option to pass in a magic string (e.g. --magic 'Bob Dole')."
|
52
|
+
exit 1
|
53
|
+
end
|
54
|
+
|
55
|
+
if options[:user].nil? && options[:path].nil?
|
56
|
+
puts "Cannot create a selfie without either the name of a registered user (e.g. --user=brett) or a path to the file containing the selfie (e.g. --path=/Users/brett/selfies/selfie.png)."
|
57
|
+
exit 1
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
if options[:action] == :add_user
|
62
|
+
if options[:image].nil?
|
63
|
+
puts "Cannot add user without an --image of them (e.g. --image=/path/to/image)"
|
64
|
+
exit 1
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
Selfiegram::Runner.run(options)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Selfiegram
|
2
|
+
module Actionable
|
3
|
+
def self.included(base)
|
4
|
+
base.send(:extend, ClassMethods)
|
5
|
+
end
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
def action(name)
|
9
|
+
define_singleton_method "#{name}" do |options|
|
10
|
+
new(options).send(name)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module BackgroundImages
|
2
2
|
class Downloader
|
3
|
-
attr_accessor :find_image_of, :file_extension, :download_url
|
3
|
+
attr_accessor :find_image_of, :save_to_file, :file_extension, :download_url
|
4
4
|
|
5
|
-
def initialize(find_image_of="Brad Pitt's Ghost")
|
5
|
+
def initialize(find_image_of="Brad Pitt's Ghost", save_to_file="")
|
6
6
|
@find_image_of = find_image_of
|
7
|
+
@save_to_file = save_to_file
|
7
8
|
end
|
8
9
|
|
9
10
|
def download
|
@@ -11,8 +12,10 @@ module BackgroundImages
|
|
11
12
|
self
|
12
13
|
end
|
13
14
|
|
14
|
-
def standardize
|
15
|
-
|
15
|
+
def standardize(selfie_image)
|
16
|
+
dimensions = "#{selfie_image.page.width}x#{selfie_image.page.height}"
|
17
|
+
|
18
|
+
`convert #{local_file}.#{file_extension} -resize '#{dimensions}^' -gravity 'center' -crop '#{dimensions}+0+0' #{local_file}.#{destination_extension}`
|
16
19
|
|
17
20
|
if command_failed?
|
18
21
|
get_new_background_image
|
@@ -27,17 +30,17 @@ module BackgroundImages
|
|
27
30
|
`find . -type f -name "*.png" -exec convert {} -strip {} \;`
|
28
31
|
end
|
29
32
|
|
30
|
-
|
33
|
+
private
|
31
34
|
def command_failed?
|
32
35
|
$? != 0
|
33
36
|
end
|
34
37
|
|
35
38
|
def local_file
|
36
|
-
"
|
39
|
+
save_to_file.split(".")[0]
|
37
40
|
end
|
38
41
|
|
39
42
|
def destination_extension
|
40
|
-
"png"
|
43
|
+
save_to_file.split(".")[1] || "png"
|
41
44
|
end
|
42
45
|
|
43
46
|
def acceptable_extensions
|
@@ -0,0 +1,58 @@
|
|
1
|
+
class Selfiegram
|
2
|
+
class Runner
|
3
|
+
class Options
|
4
|
+
include Enumerable
|
5
|
+
attr_accessor :user, :magic, :selfiegram_path, :output_path,
|
6
|
+
:background_image_path, :action, :image, :verbose
|
7
|
+
|
8
|
+
def initialize(options={})
|
9
|
+
@user = pathify options[:user]
|
10
|
+
@magic = options[:magic] || ""
|
11
|
+
@action = options[:action] || :snap
|
12
|
+
@image = options[:image]
|
13
|
+
@verbose = options[:verbose]
|
14
|
+
@selfiegram_path = options[:path] || default_selfiegram_path
|
15
|
+
@output_path = default_output_path(options[:output])
|
16
|
+
@background_image_path = default_background_image_path
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_h
|
20
|
+
instance_variables.inject({}) do |hash, var_name|
|
21
|
+
getter = var_name.to_s[1..-1].to_sym
|
22
|
+
hash[getter] = send(getter)
|
23
|
+
hash
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def each(&block)
|
28
|
+
to_h.each(&block)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
def default_selfiegram_path
|
33
|
+
absolute_path "selfies/people/#{user}.png"
|
34
|
+
end
|
35
|
+
|
36
|
+
def default_output_path(output_path)
|
37
|
+
output_path ||= Runner.root
|
38
|
+
File.expand_path(File.join(output_path, "tmp/#{magic_path}/final.png"))
|
39
|
+
end
|
40
|
+
|
41
|
+
def default_background_image_path
|
42
|
+
File.expand_path(File.join("#{output_path}", "../background.png"))
|
43
|
+
end
|
44
|
+
|
45
|
+
def magic_path
|
46
|
+
pathify(magic)
|
47
|
+
end
|
48
|
+
|
49
|
+
def pathify(string)
|
50
|
+
string.split(" ").join("_").downcase
|
51
|
+
end
|
52
|
+
|
53
|
+
def absolute_path(relative_path)
|
54
|
+
File.expand_path(File.join(Runner.root, relative_path))
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Selfiegram
|
2
|
+
class Runner
|
3
|
+
class << self
|
4
|
+
def run(options={})
|
5
|
+
options = Options.new(options).to_h
|
6
|
+
|
7
|
+
Selfiegram.send(options[:action], options)
|
8
|
+
end
|
9
|
+
|
10
|
+
def root
|
11
|
+
File.expand_path(File.join(__FILE__, "../../../"))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/selfiegram.rb
CHANGED
@@ -1,23 +1,45 @@
|
|
1
1
|
require "RMagick"
|
2
2
|
require "open-uri"
|
3
3
|
require "json"
|
4
|
+
require "fileutils"
|
5
|
+
require "pry"
|
6
|
+
|
7
|
+
class Object
|
8
|
+
def eigenclass
|
9
|
+
class << self
|
10
|
+
self
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
4
14
|
|
5
15
|
class Selfiegram
|
6
|
-
|
16
|
+
include Actionable
|
17
|
+
attr_accessor :action, :user, :magic, :selfiegram_path,
|
18
|
+
:output_path, :background_image_path, :image, :verbose
|
19
|
+
|
20
|
+
action :snap
|
21
|
+
action :add_user
|
7
22
|
|
8
|
-
def initialize(
|
9
|
-
|
23
|
+
def initialize(options={})
|
24
|
+
options.each { |key, value| send("#{key}=", value) }
|
25
|
+
puts options if verbose
|
10
26
|
end
|
11
27
|
|
12
28
|
def snap
|
29
|
+
mkdir(background_image_dir)
|
13
30
|
download_background_image
|
14
31
|
overlay_selfie
|
15
32
|
save
|
16
33
|
end
|
17
34
|
|
35
|
+
def add_user
|
36
|
+
mkdir(selfiegram_dir)
|
37
|
+
cp(image, selfiegram_path)
|
38
|
+
end
|
39
|
+
|
18
40
|
private
|
19
41
|
def save
|
20
|
-
background_image.write(
|
42
|
+
background_image.write(output_path)
|
21
43
|
end
|
22
44
|
|
23
45
|
def overlay_selfie
|
@@ -25,19 +47,41 @@ private
|
|
25
47
|
end
|
26
48
|
|
27
49
|
def background_image
|
28
|
-
@background_image ||= Magick::Image.read(
|
50
|
+
@background_image ||= Magick::Image.read(background_image_path).first
|
29
51
|
end
|
30
52
|
|
31
53
|
def selfie_image
|
32
|
-
@selfie_image ||= Magick::Image.read(
|
54
|
+
@selfie_image ||= Magick::Image.read(selfiegram_path).first
|
33
55
|
end
|
34
56
|
|
35
57
|
def background_image_downloader
|
36
|
-
@background_image_downloader ||= BackgroundImages::Downloader.new(
|
58
|
+
@background_image_downloader ||= BackgroundImages::Downloader.new(magic, background_image_path)
|
37
59
|
end
|
38
60
|
|
39
61
|
def download_background_image
|
40
|
-
background_image_downloader.download.standardize.clean
|
62
|
+
background_image_downloader.download.standardize(selfie_image).clean
|
63
|
+
end
|
64
|
+
|
65
|
+
def parent_dir(path)
|
66
|
+
components = path.split("/")
|
67
|
+
components.pop
|
68
|
+
components.join("/")
|
69
|
+
end
|
70
|
+
|
71
|
+
def selfiegram_dir
|
72
|
+
parent_dir(selfiegram_path)
|
73
|
+
end
|
74
|
+
|
75
|
+
def background_image_dir
|
76
|
+
parent_dir(background_image_path)
|
77
|
+
end
|
78
|
+
|
79
|
+
def cp(origin, destination)
|
80
|
+
FileUtils.cp(origin, destination)
|
81
|
+
end
|
82
|
+
|
83
|
+
def mkdir(dir)
|
84
|
+
FileUtils.mkdir_p(dir)
|
41
85
|
end
|
42
86
|
end
|
43
87
|
|
data/selfiegram.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
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: selfiegram 0.0.
|
5
|
+
# stub: selfiegram 0.0.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "selfiegram"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.4"
|
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"]
|
13
13
|
s.authors = ["Brett Shollenberger"]
|
14
|
-
s.date = "2014-10-
|
14
|
+
s.date = "2014-10-11"
|
15
15
|
s.description = "Take mad selfies!"
|
16
16
|
s.email = "brett.shollenberger@gmail.com"
|
17
17
|
s.executables = ["selfie"]
|
@@ -21,20 +21,26 @@ Gem::Specification.new do |s|
|
|
21
21
|
]
|
22
22
|
s.files = [
|
23
23
|
".document",
|
24
|
+
".rspec",
|
24
25
|
"Gemfile",
|
25
26
|
"Gemfile.lock",
|
27
|
+
"Guardfile",
|
26
28
|
"LICENSE.txt",
|
27
29
|
"README.rdoc",
|
28
30
|
"Rakefile",
|
29
31
|
"VERSION",
|
30
32
|
"bin/selfie",
|
33
|
+
"lib/actionable/actionable.rb",
|
31
34
|
"lib/background_images/downloader.rb",
|
32
35
|
"lib/background_images/finder.rb",
|
36
|
+
"lib/runner/options/options.rb",
|
37
|
+
"lib/runner/runner.rb",
|
33
38
|
"lib/selfiegram.rb",
|
34
39
|
"selfie_original.png",
|
35
40
|
"selfiegram.gemspec",
|
36
|
-
"
|
37
|
-
"
|
41
|
+
"selfies/people/brett.png",
|
42
|
+
"selfies/people/brettcassette.png",
|
43
|
+
"spec/spec_helper.rb"
|
38
44
|
]
|
39
45
|
s.homepage = "http://github.com/brettshollenberger/selfiegram"
|
40
46
|
s.licenses = ["MIT"]
|
@@ -51,6 +57,8 @@ Gem::Specification.new do |s|
|
|
51
57
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
52
58
|
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
53
59
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
60
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
61
|
+
s.add_development_dependency(%q<guard-rspec>, [">= 0"])
|
54
62
|
else
|
55
63
|
s.add_dependency(%q<rmagick>, [">= 0"])
|
56
64
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
@@ -58,6 +66,8 @@ Gem::Specification.new do |s|
|
|
58
66
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
59
67
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
60
68
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
69
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
70
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
61
71
|
end
|
62
72
|
else
|
63
73
|
s.add_dependency(%q<rmagick>, [">= 0"])
|
@@ -66,6 +76,8 @@ Gem::Specification.new do |s|
|
|
66
76
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
67
77
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
68
78
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
79
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
80
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
69
81
|
end
|
70
82
|
end
|
71
83
|
|
Binary file
|
Binary file
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selfiegram
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Shollenberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmagick
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description: Take mad selfies!
|
98
126
|
email: brett.shollenberger@gmail.com
|
99
127
|
executables:
|
@@ -104,20 +132,26 @@ extra_rdoc_files:
|
|
104
132
|
- README.rdoc
|
105
133
|
files:
|
106
134
|
- .document
|
135
|
+
- .rspec
|
107
136
|
- Gemfile
|
108
137
|
- Gemfile.lock
|
138
|
+
- Guardfile
|
109
139
|
- LICENSE.txt
|
110
140
|
- README.rdoc
|
111
141
|
- Rakefile
|
112
142
|
- VERSION
|
113
143
|
- bin/selfie
|
144
|
+
- lib/actionable/actionable.rb
|
114
145
|
- lib/background_images/downloader.rb
|
115
146
|
- lib/background_images/finder.rb
|
147
|
+
- lib/runner/options/options.rb
|
148
|
+
- lib/runner/runner.rb
|
116
149
|
- lib/selfiegram.rb
|
117
150
|
- selfie_original.png
|
118
151
|
- selfiegram.gemspec
|
119
|
-
-
|
120
|
-
-
|
152
|
+
- selfies/people/brett.png
|
153
|
+
- selfies/people/brettcassette.png
|
154
|
+
- spec/spec_helper.rb
|
121
155
|
homepage: http://github.com/brettshollenberger/selfiegram
|
122
156
|
licenses:
|
123
157
|
- MIT
|
data/test/helper.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'simplecov'
|
2
|
-
|
3
|
-
module SimpleCov::Configuration
|
4
|
-
def clean_filters
|
5
|
-
@filters = []
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
SimpleCov.configure do
|
10
|
-
clean_filters
|
11
|
-
load_adapter 'test_frameworks'
|
12
|
-
end
|
13
|
-
|
14
|
-
ENV["COVERAGE"] && SimpleCov.start do
|
15
|
-
add_filter "/.rvm/"
|
16
|
-
end
|
17
|
-
require 'rubygems'
|
18
|
-
require 'bundler'
|
19
|
-
begin
|
20
|
-
Bundler.setup(:default, :development)
|
21
|
-
rescue Bundler::BundlerError => e
|
22
|
-
$stderr.puts e.message
|
23
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
24
|
-
exit e.status_code
|
25
|
-
end
|
26
|
-
require 'test/unit'
|
27
|
-
require 'shoulda'
|
28
|
-
|
29
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
30
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
31
|
-
require 'selfiegram'
|
32
|
-
|
33
|
-
class Test::Unit::TestCase
|
34
|
-
end
|