fredit 0.2.6 → 0.2.8

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 CHANGED
@@ -35,26 +35,14 @@ person. Let's call this person "Chad." Chad:
35
35
  constructs found in ERB after a few minutes of explanation
36
36
  * can use a web browser interface to edit files
37
37
 
38
- One option here is to set up a full Rails development environment on
39
- Chad's computer. But this option sucks for several reasons. Chad is not
40
- very familiar with the command line, git, RVM, Ruby, rake, bundler, or
41
- you name it. To get Chad started, I would have to install a thousand and
42
- one dependencies on Chad's computer. I would have to tutor Chad on
43
- dozens of rails, bundler, gem, rake, git, and other command line
44
- incantations. All this just so Chad can tweak the frackin view
45
- templates and stylesheets. This is madness. And if you want to add
46
- additional non-Rails people as front-end collaborators, [the King of
47
- Sparta kicks you into a pit][sparta]. Have fun.
48
-
49
- [sparta]:http://www.youtube.com/watch?v=wDiUG52ZyHQ&t=38s
50
-
51
- Another option is to integrate a CMS into your Rails app. But in
52
- addition to adding a mass of dependencies and code bloat, this approach
53
- is too restrictive when you want to give your collaborator as much
54
- control over the front-end as he or she can handle.
55
-
56
- **fredit helps you empower capable non-Rails programmers to help you on
57
- the front-end of a Rails app, with less overhead.**
38
+ Setting up a full Rails development environment on
39
+ Chad's computer can be a pain.
40
+
41
+ Another option is to integrate a CMS into your Rails app. But this adds
42
+ dependencies and code bloat.
43
+
44
+ fredit is another option. It lets capable non-Rails programmers to help you on
45
+ the front-end of a Rails app, with minimal overhead.
58
46
 
59
47
  Just run a fredit-enabled instance of your Rails app on a server that he
60
48
  or she can access through a web browser. This fredit-able instance can
@@ -62,31 +50,6 @@ have its own Rails environment, database, and git branch. You probably
62
50
  put a copy of your app on a staging server anyway, so you can use that
63
51
  instance for fredit-ing.
64
52
 
65
- ## The ideal Ruby templating system is other people
66
-
67
- It's becoming less and less sustainable to have Rails programmers serve
68
- as gatekeepers and bottlenecks through which all markup and source code
69
- must pass. We should be searching for ways to allow people with a even
70
- just little bit of Ruby, HTML, JavaScript, and CSS knowledge to take
71
- some of the workload off our broad but still finite programming
72
- shoulders.
73
-
74
- Instead of looking for the next Haml or Slim or Sass, which shaves off
75
- yet another 0.5 percent of superfluous typing from your template and css
76
- typing sessions, isn't it better to make it easier for OTHER PEOPLE,
77
- EVEN NON-RAILS EXPERTS, to write and maintain the view layer for you?
78
- Who knows, they might even find it fun and educational.
79
-
80
- More compact DSLs are not the only way to increase programmer happiness
81
- and productivity. Another way is to achieve a more productive division
82
- of labor with those who aren't full-stack web dev ninjas or perhaps not
83
- even "real" programmers but who are available and willing to help.
84
- Think [comparative advantage][comparative] from your college economics
85
- class. We need to apply this idea more to software development. Let's
86
- lower the "collaboration barrier" to reap further gains in productivity.
87
-
88
- [comparative]:http://www.econlib.org/library/Topics/Details/comparativeadvantage.html
89
-
90
53
 
91
54
  ## Install and setup
92
55
 
@@ -79,7 +79,7 @@ form#createFileForm {
79
79
  <% end %>
80
80
 
81
81
  <section id="editor">
82
- <h1 id="appName">fredit <em>front-end edit</em></h1>
82
+ <h1 id="appName">fredit <em>front-end edit</em> <small>(<%=Fredit::VERSION%>)</h1>
83
83
  <form id="fileSelector" action="<%=fredit_path%>">
84
84
  <select id="fileSelectorDropDown" name="file">
85
85
  <% Fredit.editables.each_pair do |k, v| %>
@@ -1,3 +1,4 @@
1
+ require 'fredit/version'
1
2
  if Rails.version < '3.1.0'
2
3
  require 'fredit/template30'
3
4
  else
@@ -25,12 +26,13 @@ module Fredit
25
26
  end
26
27
 
27
28
  def entries(glob)
28
- Dir[Rails.root + glob].entries.map {|e| rel_path(e)}
29
+ Dir[glob].entries.map {|e| rel_path(e)}
29
30
  end
30
31
 
31
32
  def editables
32
- css = entries('public/**/*.css')
33
- js = entries('public/**/*.js')
33
+ prefix = File.directory?(Rails.root + 'app/assets') ? 'app/assets' : 'public'
34
+ css = entries(prefix + '/stylesheets/*')
35
+ js = entries(prefix + '/javascripts/*')
34
36
  views = entries('app/views/**/*.html.*')
35
37
  {:css => css, :views => views, :javascript => js}
36
38
  end
@@ -0,0 +1,3 @@
1
+ module Fredit
2
+ VERSION = '0.2.8'
3
+ end
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.2.6
4
+ version: 0.2.8
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-31 00:00:00.000000000Z
12
+ date: 2012-01-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: git
16
- requirement: &73707700 !ruby/object:Gem::Requirement
16
+ requirement: &13834340 !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: *73707700
24
+ version_requirements: *13834340
25
25
  description: Edit the front end of Rails apps through the browser.
26
26
  email:
27
27
  - dhchoi@gmail.com
@@ -35,6 +35,7 @@ files:
35
35
  - app/controllers/fredit_controller.rb
36
36
  - lib/fredit.rb
37
37
  - lib/fredit/template31.rb
38
+ - lib/fredit/version.rb
38
39
  - lib/fredit/template30.rb
39
40
  - lib/fredit/engine.rb
40
41
  - config/routes.rb
@@ -56,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
57
  version: '0'
57
58
  segments:
58
59
  - 0
59
- hash: 919454767
60
+ hash: 3836277623138806677
60
61
  required_rubygems_version: !ruby/object:Gem::Requirement
61
62
  none: false
62
63
  requirements:
@@ -65,10 +66,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  version: '0'
66
67
  segments:
67
68
  - 0
68
- hash: 919454767
69
+ hash: 3836277623138806677
69
70
  requirements: []
70
71
  rubyforge_project:
71
- rubygems_version: 1.8.11
72
+ rubygems_version: 1.8.10
72
73
  signing_key:
73
74
  specification_version: 3
74
75
  summary: Edit the front end of Rails apps through the browser.