puffs 0.2.02 → 0.2.03

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/puffs.gemspec +3 -3
  3. data/readme.md +121 -0
  4. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5304fd7d07adcaea292d602ca9e252271354d3e
4
- data.tar.gz: 295905d933ddb84776245dda4580fc52bcd5739f
3
+ metadata.gz: ed275034578496f20029ea6333fca51a1abc47fa
4
+ data.tar.gz: 81753c5514e45f504f68772cc0e3472c02e738fd
5
5
  SHA512:
6
- metadata.gz: 81c92671002c89a0958fa8c8c5348f128140b316bdf3970d22e308148230b971b97e47797c0e7cc90b7ff2675c45e7bd9772386cdf440a798a16975d4c26ae35
7
- data.tar.gz: c8c929fb1e2d0731590ebde369aa6954032e64858198a1b4a2f43541c3a85b2ee01136baff29fb4d9add247520ecaff61ae58a8f61c14239df26570ac43518c7
6
+ metadata.gz: 63fe1fac7ba793daf239293342504cdd27f82bf789cbb578d0a1d8a15b9f7cab4e1893c3135e030cbb5b21ea3aa89f3156e59d810c6d73135001e900247719df
7
+ data.tar.gz: 60eabbfc6f95889a9b9bff8cb129797e7a97d4aee97a39f6393cc11645443fd549c9217887059bf010dbc122891042d8e6cf19d4ba3f601a1941fae6fe8d4029
data/puffs.gemspec CHANGED
@@ -5,13 +5,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "puffs"
8
- spec.version = "0.2.02"
8
+ spec.version = "0.2.03"
9
9
  spec.authors = ["Zachary Moroni"]
10
10
  spec.email = ["zachary.moroni@gmail.com"]
11
11
 
12
12
  spec.summary = %q{A simple ORM and MVC inspired by Rails.}
13
- spec.description = %q{Coming Soon...}
14
- spec.homepage = "http://github.com/snackzone"
13
+ spec.description = %q{Make simple apps the Rails way, but with less overhead.}
14
+ spec.homepage = "http://github.com/snackzone/puffs"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
data/readme.md ADDED
@@ -0,0 +1,121 @@
1
+ Puffs
2
+ =====
3
+
4
+ Puffs is a lightweight MVC with a built-in ORM that allows you to make
5
+ updates to a Postgres database without writing much SQL code. Sounds a
6
+ little like Rails? Well, let's say Puffs was *inspired* by Rails ;).
7
+
8
+ How To Do Puffs
9
+ ---------------
10
+
11
+ 0. Things you need:
12
+ * Ruby
13
+ * Postgres
14
+
15
+ 1. Open command line, enter the following:
16
+ 2. gem install puffs
17
+ 3. puffs new [name of your app]
18
+ 4. puffs db create
19
+ 5. You're all set!
20
+
21
+ Enter 'puffs' into the command line with no arguments to see the full
22
+ list of commands, or just read them below:
23
+
24
+ * puffs new [app name]
25
+ * puffs server
26
+ * puffs generate
27
+ * model [model name]
28
+ * controller [controller name]
29
+ * migration [migration name]
30
+ * puffs db
31
+ * create
32
+ * migrate
33
+ * seed
34
+ * reset
35
+
36
+ Demo App
37
+ --------
38
+
39
+ As you explore this document, you may find it helpful to reference the
40
+ SamplePuffsApp on the puffs Github repo to see how everything connects.
41
+
42
+ The Puffs ORM
43
+ -------------
44
+
45
+ Puffs' object relational mapping is inspired by Rails' ActiveRecord.
46
+ It converts tables in a Postgres database into instances of the
47
+ Puffs::SQLObject class.
48
+
49
+ Puffs::SQLObject is a very lightweight version of ActiveRecord::Base.
50
+ It's a great way to use ActiveRecord::Base's CRUD methods and associations
51
+ without all the extra overhead.
52
+
53
+ Puff::SQLRelation imitates the behavior of ActiveRecord::Relation,
54
+ making sure no unnecessary queries are made to the DB.
55
+
56
+ ###All of your favorite methods are present, including:
57
+ * Create
58
+ * Find
59
+ * All
60
+ * Update
61
+ * Destroy
62
+
63
+ ###Also builds Rails table associations:
64
+ * Belongs to
65
+ * Has many
66
+ * Has one through
67
+ * Has many through
68
+
69
+ ##Puffs::SQLRelation
70
+ Has the basic functionality of ActiveRecord::Relation, allowing us to
71
+ order and search DB entries with minimal querying.
72
+
73
+ All methods are lazy and stackable. Queries are only fired when SQLRelation#load
74
+ is called or when the relation is coerced into an Array.
75
+
76
+ ###Methods included:
77
+ * All
78
+ * Where
79
+ * Includes
80
+ * Find
81
+ * Order
82
+ * Limit
83
+ * Count
84
+ * First
85
+ * Last
86
+
87
+ ###Eager loading reduces queries
88
+ * Preload has_many and belongs_to associations by calling SQLObject#includes
89
+ * Lazy and chainable.
90
+ * Reduces your DB queries from (n + 1) to 2.
91
+
92
+ Database
93
+ --------
94
+
95
+ The Puffs commands prefixed with 'db' interact with the Puffs Postgres database.
96
+ * 'puffs db create' drops any Postgres DB named 'Puffs' and creates a new,
97
+ empty one.
98
+ * 'puffs db migrate' finds and any SQL files under db/migrate that have not
99
+ been migrated and copies them into the DB.
100
+ * 'puffs db seed' calls Seed::populate in db/seeds.rb, allowing you
101
+ to quickly reset your DB to a seed file while in development.
102
+ * 'puffs db reset' executes all three of the above commands, saving you
103
+ time and energy!
104
+
105
+ Puffs::ControllerBase
106
+ ---------------------
107
+
108
+ The Puffs::ControllerBase connects your models to your routes, allowing
109
+ access to the DB through html.erb views. It's how Puffs takes over the Web.
110
+
111
+ Router
112
+ ------
113
+
114
+ Routes live in config/routes.rb. New routes are written using Regex.
115
+ Open a server connection with the 'puffs server' command.
116
+
117
+ Puffs Console
118
+ -------------
119
+
120
+ Access your DB with Puffs::SQLObject methods by simply entering
121
+ "require 'puffs'" in Pry (or IRB).
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.02
4
+ version: 0.2.03
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Moroni
@@ -148,7 +148,7 @@ dependencies:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '3.0'
151
- description: Coming Soon...
151
+ description: Make simple apps the Rails way, but with less overhead.
152
152
  email:
153
153
  - zachary.moroni@gmail.com
154
154
  executables:
@@ -191,11 +191,12 @@ files:
191
191
  - lib/sql_object/associatable.rb
192
192
  - lib/sql_object/sql_object.rb
193
193
  - puffs.gemspec
194
+ - readme.md
194
195
  - template/Gemfile
195
196
  - template/app/controllers/application_controller.rb
196
197
  - template/config/routes.rb
197
198
  - template/db/seeds.rb
198
- homepage: http://github.com/snackzone
199
+ homepage: http://github.com/snackzone/puffs
199
200
  licenses:
200
201
  - MIT
201
202
  metadata: