jimothy 0.0.21 → 0.0.22
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 +4 -4
- data/{app/assets/images/jimothy → lib/jimothy/images}/andy-bernard.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/angela-martin.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/creed-bratton.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/darryl-philbin.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/dwight-schrute.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/erin-hannon.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/flonkerton.jpg +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/jim-halpert.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/kelly-kapoor.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/kevin-malone.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/meredith-palmer.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/michael-scott.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/oscar-martinez.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/pam-beesly.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/phyllis-vance.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/ryan-howard.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/stanley-hudson.png +0 -0
- data/{app/assets/images/jimothy → lib/jimothy/images}/toby-flenderson.png +0 -0
- data/lib/jimothy/version.rb +1 -1
- data/lib/jimothy.rb +19 -4
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72719933f1723c69f04cc39c6ed0b5593c5ad8581a089ed64402fec90b6e0a20
|
4
|
+
data.tar.gz: 0401a2f58aafbd2ecd557242511180fb6d140c94632f7230ebdb53aa3ae5a7d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 306cc03ab4d64a54018c8d92e1fcfc51a924824c71bd998500d585d8b9a2451e06432a1cd2827bbf0fbb0f86b3e2142e2cb0d17cfbe46e7c7cb4d7ecaae8afa3
|
7
|
+
data.tar.gz: c0242c630f996ef7a80e924efd43cf218143cd78d47cf188f5454dedcf97cf652c7219924ce87b486e93e47ce28408a8d0e9c8d98af96d6f96d62bd23728565b
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/jimothy/version.rb
CHANGED
data/lib/jimothy.rb
CHANGED
@@ -3,18 +3,33 @@ require "jimothy/engine"
|
|
3
3
|
require "json"
|
4
4
|
|
5
5
|
GEM_ROOT = File.expand_path("../..", __FILE__)
|
6
|
+
JSON_PATH = "#{GEM_ROOT}/lib/jimothy/the-office-characters.json"
|
7
|
+
GEM_IMAGE_PATH = "#{GEM_ROOT}/lib/jimothy/images/"
|
8
|
+
RAILS_IMAGE_PATH = "/app/assets/images/"
|
6
9
|
|
7
10
|
module Jimothy
|
8
|
-
|
9
11
|
def self.get_users
|
10
|
-
users = JSON.parse(IO.read("#{
|
12
|
+
users = JSON.parse(IO.read("#{JSON_PATH}"))['users']
|
11
13
|
end
|
12
14
|
|
13
15
|
def self.seed_users
|
14
|
-
|
15
|
-
|
16
|
+
create_users
|
17
|
+
import_images
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.create_users
|
21
|
+
get_users.each do |user|
|
16
22
|
User.create(name: user['firstname'] + " " + user['lastname'], email: user['email'], image: user['image'])
|
17
23
|
end
|
18
24
|
end
|
19
25
|
|
26
|
+
def self.import_images
|
27
|
+
images = Dir["#{GEM_IMAGE_PATH}" + "*.png"]
|
28
|
+
images.each do |path|
|
29
|
+
image = path.split('/')[-1]
|
30
|
+
source = "#{GEM_IMAGE_PATH}" + image
|
31
|
+
target = "#{Rails.root}#{RAILS_IMAGE_PATH}" + image
|
32
|
+
FileUtils.cp(source, target)
|
33
|
+
end
|
34
|
+
end
|
20
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jimothy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark McDermott
|
@@ -35,24 +35,6 @@ files:
|
|
35
35
|
- README.md
|
36
36
|
- Rakefile
|
37
37
|
- app/assets/config/jimothy_manifest.js
|
38
|
-
- app/assets/images/jimothy/andy-bernard.png
|
39
|
-
- app/assets/images/jimothy/angela-martin.png
|
40
|
-
- app/assets/images/jimothy/creed-bratton.png
|
41
|
-
- app/assets/images/jimothy/darryl-philbin.png
|
42
|
-
- app/assets/images/jimothy/dwight-schrute.png
|
43
|
-
- app/assets/images/jimothy/erin-hannon.png
|
44
|
-
- app/assets/images/jimothy/flonkerton.jpg
|
45
|
-
- app/assets/images/jimothy/jim-halpert.png
|
46
|
-
- app/assets/images/jimothy/kelly-kapoor.png
|
47
|
-
- app/assets/images/jimothy/kevin-malone.png
|
48
|
-
- app/assets/images/jimothy/meredith-palmer.png
|
49
|
-
- app/assets/images/jimothy/michael-scott.png
|
50
|
-
- app/assets/images/jimothy/oscar-martinez.png
|
51
|
-
- app/assets/images/jimothy/pam-beesly.png
|
52
|
-
- app/assets/images/jimothy/phyllis-vance.png
|
53
|
-
- app/assets/images/jimothy/ryan-howard.png
|
54
|
-
- app/assets/images/jimothy/stanley-hudson.png
|
55
|
-
- app/assets/images/jimothy/toby-flenderson.png
|
56
38
|
- app/assets/stylesheets/jimothy/application.css
|
57
39
|
- app/controllers/jimothy/application_controller.rb
|
58
40
|
- app/helpers/jimothy/application_helper.rb
|
@@ -63,6 +45,24 @@ files:
|
|
63
45
|
- config/routes.rb
|
64
46
|
- lib/jimothy.rb
|
65
47
|
- lib/jimothy/engine.rb
|
48
|
+
- lib/jimothy/images/andy-bernard.png
|
49
|
+
- lib/jimothy/images/angela-martin.png
|
50
|
+
- lib/jimothy/images/creed-bratton.png
|
51
|
+
- lib/jimothy/images/darryl-philbin.png
|
52
|
+
- lib/jimothy/images/dwight-schrute.png
|
53
|
+
- lib/jimothy/images/erin-hannon.png
|
54
|
+
- lib/jimothy/images/flonkerton.jpg
|
55
|
+
- lib/jimothy/images/jim-halpert.png
|
56
|
+
- lib/jimothy/images/kelly-kapoor.png
|
57
|
+
- lib/jimothy/images/kevin-malone.png
|
58
|
+
- lib/jimothy/images/meredith-palmer.png
|
59
|
+
- lib/jimothy/images/michael-scott.png
|
60
|
+
- lib/jimothy/images/oscar-martinez.png
|
61
|
+
- lib/jimothy/images/pam-beesly.png
|
62
|
+
- lib/jimothy/images/phyllis-vance.png
|
63
|
+
- lib/jimothy/images/ryan-howard.png
|
64
|
+
- lib/jimothy/images/stanley-hudson.png
|
65
|
+
- lib/jimothy/images/toby-flenderson.png
|
66
66
|
- lib/jimothy/the-office-characters.json
|
67
67
|
- lib/jimothy/version.rb
|
68
68
|
- lib/tasks/jimothy_tasks.rake
|