puffs 0.2.0 → 0.2.01
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/SamplePuffsApp/Gemfile +3 -0
- data/SamplePuffsApp/Gemfile.lock +44 -0
- data/SamplePuffsApp/app/controllers/application_controller.rb +3 -0
- data/SamplePuffsApp/app/controllers/comments.rb +3 -0
- data/SamplePuffsApp/app/controllers/posts.rb +16 -0
- data/SamplePuffsApp/app/controllers/users.rb +6 -0
- data/SamplePuffsApp/app/models/comment.rb +5 -0
- data/SamplePuffsApp/app/models/post.rb +5 -0
- data/SamplePuffsApp/app/models/user.rb +6 -0
- data/SamplePuffsApp/app/views/posts_controller/index.html.erb +31 -0
- data/SamplePuffsApp/app/views/users_controller/show.html.erb +18 -0
- data/SamplePuffsApp/config/routes.rb +17 -0
- data/SamplePuffsApp/db/migrate/201600202515013018__create_user.sql +3 -0
- data/SamplePuffsApp/db/migrate/201600202515013026__create_post.sql +4 -0
- data/SamplePuffsApp/db/migrate/201600202515013032__create_comment.sql +5 -0
- data/SamplePuffsApp/db/seeds.rb +56 -0
- data/bin/puffs +52 -16
- data/lib/controller_base.rb +1 -1
- data/lib/puffs.rb +12 -11
- data/lib/relation.rb +4 -3
- data/lib/router.rb +0 -3
- data/lib/server_connection.rb +1 -1
- data/lib/sql_object/associatable.rb +3 -1
- data/lib/sql_object/sql_object.rb +3 -3
- data/puffs.gemspec +2 -3
- data/template/app/controllers/application_controller.rb +1 -1
- data/template/db/seeds.rb +0 -2
- metadata +19 -4
- data/lib/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2050723fb03f6747f185ea66bc3327571325677d
|
4
|
+
data.tar.gz: 8302419142f3d97e42ebcc6e0e37fe9bbae8d1fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0955ca1d1db9288ed45e7913095cb811ffda4d8a93495cdf4e3875d93a44185726c1bdc219320ae2ecdbee60a6e71fb1529094fdb0a61c1aac3ee15feb150047
|
7
|
+
data.tar.gz: 552718aa5c2552d4a72aeb31ba4ca3af0d865e3097d8c473c6a653152a8ff3e736707018e2686bfb81d028cfd61ce63c77f4d2be3fcc69d30d50ff00a21a3c82
|
@@ -0,0 +1,44 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.2.5.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
|
+
coderay (1.1.1)
|
11
|
+
fileutils (0.7)
|
12
|
+
rmagick (>= 2.13.1)
|
13
|
+
i18n (0.7.0)
|
14
|
+
json (1.8.3)
|
15
|
+
method_source (0.8.2)
|
16
|
+
minitest (5.8.4)
|
17
|
+
pg (0.18.4)
|
18
|
+
pry (0.10.3)
|
19
|
+
coderay (~> 1.1.0)
|
20
|
+
method_source (~> 0.8.1)
|
21
|
+
slop (~> 3.4)
|
22
|
+
puffs (0.2.01)
|
23
|
+
activesupport (~> 4.2.5.1)
|
24
|
+
fileutils (~> 0.7)
|
25
|
+
pg (~> 0.18)
|
26
|
+
pry (~> 0.10.3)
|
27
|
+
rack (~> 1.6.4)
|
28
|
+
thor (~> 0.19)
|
29
|
+
rack (1.6.4)
|
30
|
+
rmagick (2.15.4)
|
31
|
+
slop (3.6.0)
|
32
|
+
thor (0.19.1)
|
33
|
+
thread_safe (0.3.5)
|
34
|
+
tzinfo (1.2.2)
|
35
|
+
thread_safe (~> 0.1)
|
36
|
+
|
37
|
+
PLATFORMS
|
38
|
+
ruby
|
39
|
+
|
40
|
+
DEPENDENCIES
|
41
|
+
puffs
|
42
|
+
|
43
|
+
BUNDLED WITH
|
44
|
+
1.11.2
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class PostsController < Puffs::ControllerBase
|
2
|
+
def index
|
3
|
+
@posts = Post.all.includes(:user).includes(:comments).order(id: :desc)
|
4
|
+
end
|
5
|
+
|
6
|
+
def create
|
7
|
+
@post = Post.new(body: params['post']['body'], author_id: 6).save
|
8
|
+
redirect_to ('/posts')
|
9
|
+
end
|
10
|
+
|
11
|
+
def destroy
|
12
|
+
@post = Post.find(params['post_id'])
|
13
|
+
@post.destroy!
|
14
|
+
redirect_to ('/posts')
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<h1>Post Index</h1>
|
2
|
+
|
3
|
+
<h2>Say Something</h2>
|
4
|
+
<form action="/posts/create" method="post">
|
5
|
+
<label>Type you post in here.
|
6
|
+
<input type="text" name="post[body]" value="">
|
7
|
+
</label>
|
8
|
+
<button>Submit</button>
|
9
|
+
</form>
|
10
|
+
|
11
|
+
<ul>
|
12
|
+
<% @posts.each do |post| %>
|
13
|
+
<li>
|
14
|
+
<h2><a href="/users/<%=post.author_id%>"><%= post.user.name %></a> Posted:</h2>
|
15
|
+
<h3><%= post.body %></h3>
|
16
|
+
<% if post.author_id == "6" %>
|
17
|
+
<form action="/posts/destroy" method="post">
|
18
|
+
<input type="hidden" name="_method" value="delete">
|
19
|
+
<input type="hidden" name="post_id" value="<%= post.id %>">
|
20
|
+
<button>Delete Post</button>
|
21
|
+
</form>
|
22
|
+
<% end %>
|
23
|
+
<h3>Comments:</h3>
|
24
|
+
<ul>
|
25
|
+
<% post.comments.each do |comment| %>
|
26
|
+
<li><%= comment.body %></li>
|
27
|
+
<% end %>
|
28
|
+
</ul>
|
29
|
+
</li>
|
30
|
+
<% end %>
|
31
|
+
</ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<h1><%= @user.name %></h1>
|
2
|
+
|
3
|
+
<ul>
|
4
|
+
<% @user.posts.each do |post| %>
|
5
|
+
<li>
|
6
|
+
<h3><%= post.body %></h3>
|
7
|
+
<h3>Comments:</h3>
|
8
|
+
<ul>
|
9
|
+
<% post.comments.each do |comment| %>
|
10
|
+
<li><%= comment.body %> - <%= comment.user.name %></li>
|
11
|
+
<% end %>
|
12
|
+
</ul>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
<br />
|
17
|
+
<br />
|
18
|
+
<a href="/posts">Back to all the posts!</a>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
ROUTER = Router.new
|
2
|
+
ROUTER.draw do
|
3
|
+
#Some sample routes:
|
4
|
+
|
5
|
+
get Regexp.new("^/posts$"), PostsController, :index
|
6
|
+
post Regexp.new("^/posts/create$"), PostsController, :create
|
7
|
+
post Regexp.new("^/posts/destroy$"), PostsController, :destroy
|
8
|
+
|
9
|
+
get Regexp.new("^/users$"), UsersController, :index
|
10
|
+
|
11
|
+
get Regexp.new("^/users/(?<user_id>\\d+)$"), UsersController, :show
|
12
|
+
|
13
|
+
# get Regexp.new("^/cats/new$"), CatsController, :new
|
14
|
+
# post Regexp.new("^/cats/create$"), CatsController, :create
|
15
|
+
# get Regexp.new("^/cats$"), CatsController, :index
|
16
|
+
# get Regexp.new("^/cats/(?<cat_id>\\d+)$"), CatsController, :show
|
17
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
class Seed
|
2
|
+
def self.populate
|
3
|
+
User.destroy_all!
|
4
|
+
Post.destroy_all!
|
5
|
+
Comment.destroy_all!
|
6
|
+
|
7
|
+
zach = User.new(name: "Zach").save
|
8
|
+
tina = User.new(name: "Tina").save
|
9
|
+
breakfast = User.new(name: "Breakfast").save
|
10
|
+
|
11
|
+
z1 = Post.new(body: "Pufffffffffffssss!!!", author_id: zach.id).save
|
12
|
+
z2 = Post.new(body: "Puffs ain't crispy.", author_id: zach.id).save
|
13
|
+
z3 = Post.new(body: "Cheesy Puffs!", author_id: zach.id).save
|
14
|
+
|
15
|
+
t1 = Post.new(body: "I heart Puffs!", author_id: tina.id).save
|
16
|
+
t2 = Post.new(body: "Puffs is tasty!", author_id: tina.id).save
|
17
|
+
t3 = Post.new(body: "Puffs, wow!", author_id: tina.id).save
|
18
|
+
|
19
|
+
b1 = Post.new(body: "I'm Breakfast!", author_id: breakfast.id).save
|
20
|
+
b2 = Post.new(body: "I'm a cat!", author_id: breakfast.id).save
|
21
|
+
b3 = Post.new(body: "Puffs?", author_id: breakfast.id).save
|
22
|
+
|
23
|
+
Comment.new(body: "I'm a cat!", commenter_id: breakfast.id, post_id: t1.id).save
|
24
|
+
Comment.new(body: "I'm a cat!", commenter_id: breakfast.id, post_id: t2.id).save
|
25
|
+
Comment.new(body: "I'm a cat!", commenter_id: breakfast.id, post_id: t3.id).save
|
26
|
+
|
27
|
+
Comment.new(body: "I'm hungry!", commenter_id: zach.id, post_id: b1.id).save
|
28
|
+
Comment.new(body: "PUFFS IS AWESOME", commenter_id: zach.id, post_id: b2.id).save
|
29
|
+
Comment.new(body: "Such puffs!", commenter_id: zach.id, post_id: b3.id).save
|
30
|
+
|
31
|
+
Comment.new(body: "Amaze!", commenter_id: tina.id, post_id: z1.id).save
|
32
|
+
Comment.new(body: "Love puffs!", commenter_id: tina.id, post_id: z2.id).save
|
33
|
+
Comment.new(body: "Puffs is easy!", commenter_id: tina.id, post_id: z3.id).save
|
34
|
+
|
35
|
+
#Create seeds in this method. Here's an example:
|
36
|
+
|
37
|
+
# Cat.destroy_all!
|
38
|
+
# Human.destroy_all!
|
39
|
+
# House.destroy_all!
|
40
|
+
#
|
41
|
+
# h1 = House.new(address: '26th and Guerrero').save
|
42
|
+
# h2 = House.new(address: 'Dolores and Market').save
|
43
|
+
# h3 = House.new(address: '123 4th Street').save
|
44
|
+
#
|
45
|
+
# devon = Human.new(fname: 'Devon', lname: 'Watts', house_id: h1.id).save
|
46
|
+
# matt = Human.new(fname: 'Matt', lname: 'Rubens', house_id: h1.id).save
|
47
|
+
# ned = Human.new(fname: 'Ned', lname: 'Ruggeri', house_id: h2.id).save
|
48
|
+
# catless = Human.new(fname: 'Catless', lname: 'Human', house_id: h3.id).save
|
49
|
+
#
|
50
|
+
# Cat.new(name: 'Breakfast', owner_id: devon.id).save
|
51
|
+
# Cat.new(name:'Earl', owner_id: matt.id).save
|
52
|
+
# Cat.new(name: 'Haskell', owner_id: ned.id).save
|
53
|
+
# Cat.new(name: 'Markov', owner_id: ned.id).save
|
54
|
+
# Cat.new(name: 'Stray Cat')
|
55
|
+
end
|
56
|
+
end
|
data/bin/puffs
CHANGED
@@ -10,8 +10,7 @@ class Generate < Thor
|
|
10
10
|
|
11
11
|
#writes model file
|
12
12
|
File.open("./app/models/#{m_name.downcase}.rb", "w") do |f|
|
13
|
-
f.write("
|
14
|
-
f.write("class #{m_name} < SQLObject\n\n")
|
13
|
+
f.write("class #{m_name} < Puffs::SQLObject\n\n")
|
15
14
|
f.write("end\n")
|
16
15
|
f.write("#{m_name}.finalize!")
|
17
16
|
end
|
@@ -25,16 +24,12 @@ class Generate < Thor
|
|
25
24
|
|
26
25
|
#Writes controller file
|
27
26
|
File.open("./app/controllers/#{c_name.downcase}.rb", "w") do |f|
|
28
|
-
f.write("
|
29
|
-
f.write("project_root = File.dirname(File.absolute_path(__FILE__))\n")
|
30
|
-
f.write("Dir.glob(project_root + '/../models/*.rb') { |file| require file }\n\n")
|
31
|
-
|
32
|
-
f.write("class #{c_name}Controller < ControllerBase\n\n")
|
27
|
+
f.write("class #{c_name}Controller < Puffs::ControllerBase\n\n")
|
33
28
|
f.write("end")
|
34
29
|
end
|
35
30
|
|
36
31
|
#creates empty views directory
|
37
|
-
Dir.mkdir "./app/views/#{c_name.downcase}"
|
32
|
+
Dir.mkdir "./app/views/#{c_name.downcase}_controller"
|
38
33
|
puts "#{c_name} controller created"
|
39
34
|
end
|
40
35
|
|
@@ -49,6 +44,7 @@ class Generate < Thor
|
|
49
44
|
File.open("./db/migrate/#{filename}.sql", "w") do |f|
|
50
45
|
f.write ("CREATE TABLE IF NOT EXISTS #{name} (\n")
|
51
46
|
f.write ("\tid SERIAL PRIMARY KEY,\n")
|
47
|
+
f.write ("\tname VARCHAR(255) NOT NULL")
|
52
48
|
f.write (");")
|
53
49
|
end
|
54
50
|
end
|
@@ -71,7 +67,7 @@ class Db < Thor
|
|
71
67
|
|
72
68
|
desc "seed", "seeds the DB"
|
73
69
|
def seed
|
74
|
-
|
70
|
+
require_relative '../lib/puffs'
|
75
71
|
Seed.populate
|
76
72
|
puts 'db seeded!'
|
77
73
|
end
|
@@ -85,16 +81,16 @@ class Db < Thor
|
|
85
81
|
end
|
86
82
|
end
|
87
83
|
|
88
|
-
class
|
89
|
-
|
90
|
-
|
84
|
+
class CLI < Thor
|
85
|
+
register(Generate, 'generate', 'generate <command>', 'Generates a model or controller.')
|
86
|
+
register(Db, 'db', 'db <command>', 'Accesses commands for the DB.')
|
91
87
|
|
92
88
|
desc "g", "alias of generate subcommand"
|
93
89
|
subcommand 'g', Generate
|
94
90
|
|
95
91
|
desc 'server', 'starts the Puffs server'
|
96
92
|
def server
|
97
|
-
require_relative '../lib/
|
93
|
+
require_relative '../lib/puffs'
|
98
94
|
ServerConnection.start
|
99
95
|
end
|
100
96
|
|
@@ -123,6 +119,46 @@ class Puffs < Thor
|
|
123
119
|
end
|
124
120
|
end
|
125
121
|
|
126
|
-
|
127
|
-
|
128
|
-
Generate
|
122
|
+
# class Snacks < Thor
|
123
|
+
# desc "generate", "subcommand used for generating models and controllers"
|
124
|
+
# subcommand 'generate', Generate
|
125
|
+
#
|
126
|
+
# desc "g", "alias of generate subcommand"
|
127
|
+
# subcommand 'g', Generate
|
128
|
+
#
|
129
|
+
# desc 'server', 'starts the Puffs server'
|
130
|
+
# def server
|
131
|
+
# require_relative '../lib/puffs'
|
132
|
+
# ServerConnection.start
|
133
|
+
# end
|
134
|
+
#
|
135
|
+
# desc 'new', 'creates a new Puffs app'
|
136
|
+
# def new(name)
|
137
|
+
# Dir.mkdir "./#{name}"
|
138
|
+
# Dir.mkdir "./#{name}/app"
|
139
|
+
# Dir.mkdir "./#{name}/app/models"
|
140
|
+
# Dir.mkdir "./#{name}/app/views"
|
141
|
+
# Dir.mkdir "./#{name}/app/controllers"
|
142
|
+
# File.open("./#{name}/app/controllers/application_controller.rb", "w") do |f|
|
143
|
+
# f.write File.read(File.expand_path('../../template/app/controllers/application_controller.rb', __FILE__))
|
144
|
+
# end
|
145
|
+
# Dir.mkdir "./#{name}/config"
|
146
|
+
# File.open("./#{name}/config/routes.rb", "w") do |f|
|
147
|
+
# f.write File.read(File.expand_path('../../template/config/routes.rb', __FILE__))
|
148
|
+
# end
|
149
|
+
# Dir.mkdir "./#{name}/db"
|
150
|
+
# Dir.mkdir "./#{name}/db/migrate"
|
151
|
+
# File.open("./#{name}/db/seeds.rb", "w") do |f|
|
152
|
+
# f.write File.read(File.expand_path('../../template/db/seeds.rb', __FILE__))
|
153
|
+
# end
|
154
|
+
# File.open("./#{name}/Gemfile", "w") do |f|
|
155
|
+
# f.write File.read(File.expand_path('../../template/Gemfile', __FILE__))
|
156
|
+
# end
|
157
|
+
# end
|
158
|
+
# end
|
159
|
+
#
|
160
|
+
# Snacks.start(ARGV)
|
161
|
+
# Db.start(ARGV)
|
162
|
+
# Generate.start(ARGV)
|
163
|
+
|
164
|
+
CLI.start(ARGV)
|
data/lib/controller_base.rb
CHANGED
data/lib/puffs.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
|
1
|
+
module Puffs
|
2
|
+
#enjoy puffs
|
3
|
+
end
|
2
4
|
|
3
|
-
|
4
|
-
require_relative
|
5
|
-
require_relative 'controller_base'
|
5
|
+
require_relative "sql_object/sql_object"
|
6
|
+
require_relative "controller_base"
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
Dir.glob('./app/models/*.rb') {|file| require file}
|
9
|
+
Dir.glob('./app/controllers/*.rb') {|file| require file}
|
9
10
|
|
10
|
-
|
11
|
-
# Dir.glob('./app/controllers/*.rb') { |file| require file }
|
11
|
+
require './db/seeds'
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
require_relative 'db_connection'
|
14
|
+
require_relative 'router'
|
15
|
+
require_relative 'server_connection'
|
16
|
+
require_relative 'session'
|
data/lib/relation.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative './../lib/db_connection'
|
2
2
|
require_relative 'sql_object/sql_object'
|
3
|
+
# require_relative 'puffs'
|
3
4
|
|
4
5
|
class Puffs::SQLRelation
|
5
6
|
def self.build_association(base, included, method_name)
|
@@ -26,7 +27,7 @@ class Puffs::SQLRelation
|
|
26
27
|
#After we find our values iteratively, we overwrite the method again
|
27
28
|
#to the result values to reduce future lookup time to O(1).
|
28
29
|
new_match = proc { associated }
|
29
|
-
SQLObject.define_singleton_method_by_proc(
|
30
|
+
Puffs::SQLObject.define_singleton_method_by_proc(
|
30
31
|
self, method_name, new_match)
|
31
32
|
|
32
33
|
associated
|
@@ -35,7 +36,7 @@ class Puffs::SQLRelation
|
|
35
36
|
#we overwrite the association method for each SQLObject in the
|
36
37
|
#collection so that it points to our cached relation and doesn't fire a query.
|
37
38
|
base.collection.each do |b_sql_obj|
|
38
|
-
SQLObject.define_singleton_method_by_proc(
|
39
|
+
Puffs::SQLObject.define_singleton_method_by_proc(
|
39
40
|
b_sql_obj, method_name, match)
|
40
41
|
end
|
41
42
|
end
|
@@ -136,7 +137,7 @@ class Puffs::SQLRelation
|
|
136
137
|
(#{in_ids});
|
137
138
|
SQL
|
138
139
|
included = assoc.model_class.parse_all(results)
|
139
|
-
SQLRelation.build_association(relation, included, param)
|
140
|
+
Puffs::SQLRelation.build_association(relation, included, param)
|
140
141
|
end
|
141
142
|
end
|
142
143
|
|
data/lib/router.rb
CHANGED
data/lib/server_connection.rb
CHANGED
@@ -28,6 +28,8 @@ class HasManyOptions < AssocOptions
|
|
28
28
|
def initialize(name, self_class_name, options = {})
|
29
29
|
@primary_key = options[:primary_key] || :id
|
30
30
|
@foreign_key = options[:foreign_key] || "#{self_class_name.to_s.underscore}_id".to_sym
|
31
|
+
|
32
|
+
#I think there is a bug here, investigate.
|
31
33
|
@class_name = options[:class_name] || name.to_s.singularize.camelcase
|
32
34
|
end
|
33
35
|
end
|
@@ -85,7 +87,7 @@ module Associatable
|
|
85
87
|
through_class = through_options.model_class
|
86
88
|
key_val = self.send(through_options.primary_key)
|
87
89
|
|
88
|
-
#2 queries, we could reduce to 1 by writing SQLRelation
|
90
|
+
#2 queries, we could reduce to 1 by writing Puffs::SQLRelation.join.
|
89
91
|
through_class.where(through_fk => key_val)
|
90
92
|
.includes(source_name)
|
91
93
|
.load
|
@@ -2,7 +2,7 @@ require_relative '../../lib/db_connection'
|
|
2
2
|
require_relative 'associatable'
|
3
3
|
require_relative '../relation'
|
4
4
|
require 'active_support/inflector'
|
5
|
-
|
5
|
+
# require_relative '../puffs'
|
6
6
|
|
7
7
|
class Puffs::SQLObject
|
8
8
|
extend Associatable
|
@@ -13,7 +13,7 @@ class Puffs::SQLObject
|
|
13
13
|
|
14
14
|
RELATION_METHODS.each do |method|
|
15
15
|
define_singleton_method(method) do |arg|
|
16
|
-
SQLRelation.new(klass: self).send(method, arg)
|
16
|
+
Puffs::SQLRelation.new(klass: self).send(method, arg)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -69,7 +69,7 @@ class Puffs::SQLObject
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def self.parse_all(results)
|
72
|
-
relation = SQLRelation.new(klass: self, loaded: true)
|
72
|
+
relation = Puffs::SQLRelation.new(klass: self, loaded: true)
|
73
73
|
results.each do |result|
|
74
74
|
relation << self.new(result)
|
75
75
|
end
|
data/puffs.gemspec
CHANGED
@@ -2,11 +2,10 @@
|
|
2
2
|
|
3
3
|
lib = File.expand_path('../lib', __FILE__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'version'
|
6
5
|
|
7
6
|
Gem::Specification.new do |spec|
|
8
7
|
spec.name = "puffs"
|
9
|
-
spec.version =
|
8
|
+
spec.version = "0.2.01"
|
10
9
|
spec.authors = ["Zachary Moroni"]
|
11
10
|
spec.email = ["zachary.moroni@gmail.com"]
|
12
11
|
|
@@ -28,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
28
27
|
|
29
28
|
spec.add_runtime_dependency "thor", "~> 0.19"
|
30
29
|
spec.add_runtime_dependency "pg", "~> 0.18"
|
31
|
-
spec.add_runtime_dependency "activesupport", "~> 4.
|
30
|
+
spec.add_runtime_dependency "activesupport", "~> 4.2.5.1"
|
32
31
|
spec.add_runtime_dependency "pry", "~> 0.10.3"
|
33
32
|
spec.add_runtime_dependency "rack", "~> 1.6.4"
|
34
33
|
spec.add_runtime_dependency "fileutils", "~> 0.7"
|
data/template/db/seeds.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puffs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.01
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Moroni
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.
|
47
|
+
version: 4.2.5.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.
|
54
|
+
version: 4.2.5.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,6 +152,22 @@ files:
|
|
152
152
|
- Gemfile
|
153
153
|
- Gemfile.lock
|
154
154
|
- LICENSE.txt
|
155
|
+
- SamplePuffsApp/Gemfile
|
156
|
+
- SamplePuffsApp/Gemfile.lock
|
157
|
+
- SamplePuffsApp/app/controllers/application_controller.rb
|
158
|
+
- SamplePuffsApp/app/controllers/comments.rb
|
159
|
+
- SamplePuffsApp/app/controllers/posts.rb
|
160
|
+
- SamplePuffsApp/app/controllers/users.rb
|
161
|
+
- SamplePuffsApp/app/models/comment.rb
|
162
|
+
- SamplePuffsApp/app/models/post.rb
|
163
|
+
- SamplePuffsApp/app/models/user.rb
|
164
|
+
- SamplePuffsApp/app/views/posts_controller/index.html.erb
|
165
|
+
- SamplePuffsApp/app/views/users_controller/show.html.erb
|
166
|
+
- SamplePuffsApp/config/routes.rb
|
167
|
+
- SamplePuffsApp/db/migrate/201600202515013018__create_user.sql
|
168
|
+
- SamplePuffsApp/db/migrate/201600202515013026__create_post.sql
|
169
|
+
- SamplePuffsApp/db/migrate/201600202515013032__create_comment.sql
|
170
|
+
- SamplePuffsApp/db/seeds.rb
|
155
171
|
- app/controllers/cats_controller.rb
|
156
172
|
- app/controllers/house_controller.rb
|
157
173
|
- app/controllers/humans_controller.rb
|
@@ -181,7 +197,6 @@ files:
|
|
181
197
|
- lib/session.rb
|
182
198
|
- lib/sql_object/associatable.rb
|
183
199
|
- lib/sql_object/sql_object.rb
|
184
|
-
- lib/version.rb
|
185
200
|
- puffs.gemspec
|
186
201
|
- template/Gemfile
|
187
202
|
- template/app/controllers/application_controller.rb
|
data/lib/version.rb
DELETED