fredit 0.1.8 → 0.1.9
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.
- data/README.md +65 -33
- data/app/controllers/fredit_controller.rb +1 -0
- metadata +6 -6
data/README.md
CHANGED
@@ -27,7 +27,7 @@ You are welcome to fork and add support for Haml and other template
|
|
27
27
|
handlers.
|
28
28
|
|
29
29
|
|
30
|
-
##
|
30
|
+
## fredit lowers the barriers to collaboration
|
31
31
|
|
32
32
|
On a current Rails project, I needed to delegate responsibility for
|
33
33
|
improving the copy, the styling, and the user interface to another
|
@@ -40,26 +40,56 @@ person. Let's call this person "Chad." Chad:
|
|
40
40
|
* can use a web browser interface to edit files
|
41
41
|
|
42
42
|
One option here is to set up a full Rails development environment on
|
43
|
-
Chad's computer. But this option
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
43
|
+
Chad's computer. But this option sucks for several reasons. Chad is not
|
44
|
+
very familiar with the command line, git, RVM, Ruby, rake, bundler, or
|
45
|
+
you name it. To get Chad started, I would have to install a thousand and
|
46
|
+
one dependencies on Chad's computer. I would have to tutor Chad on
|
47
|
+
dozens of rails, bundler, gem, rake, git, and other command line
|
48
|
+
incantations. All this just so Chad can tweak the frackin view
|
49
|
+
templates and stylesheets. This is madness. And if you want to add
|
50
|
+
additional non-Rails people as front-end collaborators, [the King of
|
51
|
+
Sparta kicks you into a pit][sparta]. Have fun.
|
52
|
+
|
53
|
+
[sparta]:http://www.youtube.com/watch?v=-qR0Uke2XNI
|
51
54
|
|
52
55
|
Another option is to integrate a CMS into your Rails app. But in
|
53
|
-
addition to
|
54
|
-
you want to give your collaborator as much
|
55
|
-
he or she can handle.
|
56
|
+
addition to adding a mass of dependencies and code bloat, this approach
|
57
|
+
is too restrictive when you want to give your collaborator as much
|
58
|
+
control over the front-end as he or she can handle.
|
56
59
|
|
57
|
-
fredit
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
browser.
|
62
|
-
environment, database, and git branch.
|
60
|
+
**fredit helps you empower capable non-Rails programmers to help you on
|
61
|
+
the front-end of a Rails app, with less overhead.**
|
62
|
+
|
63
|
+
Just run a fredit-enabled instance of your Rails app on a server that he
|
64
|
+
or she can access through a web browser. This fredit-able instance can
|
65
|
+
have its own Rails environment, database, and git branch. You probably
|
66
|
+
put a copy of your app on a staging server anyway, so you can use that
|
67
|
+
instance for fredit-ing.
|
68
|
+
|
69
|
+
## The ideal Ruby templating system is other people
|
70
|
+
|
71
|
+
It's becoming less and less sustainable to have Rails programmers serve
|
72
|
+
as gatekeepers and bottlenecks through which all markup and source code
|
73
|
+
must pass. We should be searching for ways to allow people with a even
|
74
|
+
just little bit of Ruby, HTML, JavaScript, and CSS knowledge to take
|
75
|
+
some of the workload off our broad but still finite programming
|
76
|
+
shoulders.
|
77
|
+
|
78
|
+
Instead of looking for the next Haml or Slim or Sass, which shaves off
|
79
|
+
yet another 0.5 percent of superfluous typing from your template and css
|
80
|
+
typing sessions, isn't it better to make it easier for OTHER PEOPLE,
|
81
|
+
EVEN NON-RAILS EXPERTS, to write and maintain the view layer for you?
|
82
|
+
Who knows, they might even find it fun and educational.
|
83
|
+
|
84
|
+
More compact DSLs are not the only way to increase programmer happiness
|
85
|
+
and productivity. Another way is to achieve a more productive division
|
86
|
+
of labor with those who aren't full-stack web dev ninjas or perhaps not
|
87
|
+
even "real" programmers but who are available and willing to help.
|
88
|
+
Think [comparative advantage][comparative] from your college economics
|
89
|
+
class. We need to apply this idea more to software development. Let's
|
90
|
+
lower the "collaboration barrier" to reap further gains in productivity.
|
91
|
+
|
92
|
+
[comparative]:http://www.econlib.org/library/Topics/Details/comparativeadvantage.html
|
63
93
|
|
64
94
|
|
65
95
|
## Install and setup
|
@@ -81,14 +111,15 @@ and then run `RAILS_ENV=staging bundle install`, adjusting the
|
|
81
111
|
`RAILS_ENV` to your target environment.
|
82
112
|
|
83
113
|
To run your Rails app with fredit, just start it in the Rails
|
84
|
-
environment Gemfile group you put
|
85
|
-
app in the browser, you should see the injected view
|
86
|
-
be able to click through them to fredit's source code
|
114
|
+
environment corresponding to the Gemfile group you put fredit in. When
|
115
|
+
you hit the app in the browser, you should see the injected view
|
116
|
+
template links and be able to click through them to fredit's source code
|
117
|
+
editor.
|
87
118
|
|
88
119
|
|
89
|
-
## fredit with git
|
120
|
+
## Use fredit with git
|
90
121
|
|
91
|
-
fredit assumes that the Rails instance it is running on is a
|
122
|
+
fredit assumes that the Rails instance it is running on is a git
|
92
123
|
repository. **It also assumes that you have set the current branch of
|
93
124
|
this git repository to the one you want your collaborator's changes
|
94
125
|
committed to.**
|
@@ -109,17 +140,17 @@ upstream repository, run a CI build server, etc.
|
|
109
140
|
|
110
141
|
## Security
|
111
142
|
|
112
|
-
fredit has rudimentary security features. fredit will
|
113
|
-
to use the fredit web interface to edit a file above
|
114
|
-
Rails application root directory of that Rails instance.
|
115
|
-
leaves things like database.yml configurations accessible
|
116
|
-
editor. Anyone with access to the fredit editing interface
|
117
|
-
power to run arbitrary SQL on your environment's database.
|
143
|
+
Currently, fredit has only rudimentary security features. fredit will
|
144
|
+
not allow any user to use the fredit web interface to edit a file above
|
145
|
+
or outside the Rails application root directory of that Rails instance.
|
146
|
+
But this still leaves things like database.yml configurations accessible
|
147
|
+
to the fredit editor. Anyone with access to the fredit editing interface
|
148
|
+
will have the power to run arbitrary SQL on your environment's database.
|
118
149
|
|
119
150
|
So please take additional precautions to make sure that your
|
120
|
-
fredit-enabled Rails instance
|
121
|
-
At a minimum, use
|
122
|
-
|
151
|
+
fredit-enabled Rails instance can't be accessed by hostile strangers.
|
152
|
+
At a minimum, use Basic Authentication or the like to restrict access to
|
153
|
+
this entire Rails instance.
|
123
154
|
|
124
155
|
It's probably not a good idea to run a fredit-enabled Rails app on a
|
125
156
|
server with important stuff on it. Use a scratch staging server.
|
@@ -129,7 +160,8 @@ server with important stuff on it. Use a scratch staging server.
|
|
129
160
|
|
130
161
|
Feel free to fork and take this simple idea wherever you want to. The
|
131
162
|
current version of this project is really just a quick and dirty
|
132
|
-
implementation that I needed pronto.
|
163
|
+
implementation that I needed pronto. Pull requests are very welcome.
|
164
|
+
|
133
165
|
|
134
166
|
|
135
167
|
## License
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fredit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-27 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: git
|
16
|
-
requirement: &
|
16
|
+
requirement: &70199512506440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70199512506440
|
25
25
|
description: Edit the front end of Rails apps through the browser.
|
26
26
|
email:
|
27
27
|
- dhchoi@gmail.com
|
@@ -56,7 +56,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
56
|
version: '0'
|
57
57
|
segments:
|
58
58
|
- 0
|
59
|
-
hash:
|
59
|
+
hash: 1023881741045697263
|
60
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
segments:
|
67
67
|
- 0
|
68
|
-
hash:
|
68
|
+
hash: 1023881741045697263
|
69
69
|
requirements: []
|
70
70
|
rubyforge_project:
|
71
71
|
rubygems_version: 1.8.6
|