app_frame 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +26 -0
  4. data/Gemfile.lock +181 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.md +25 -0
  7. data/Rakefile +47 -0
  8. data/VERSION +1 -0
  9. data/app/assets/javascripts/app_frame/application.js +9 -0
  10. data/app/assets/stylesheets/app_frame/_devise.scss +41 -0
  11. data/app/assets/stylesheets/app_frame/_tree.scss +31 -0
  12. data/app/assets/stylesheets/app_frame/application.scss +73 -0
  13. data/app/controllers/app_frame/devise/confirmations_controller.rb +3 -0
  14. data/app/controllers/app_frame/devise/passwords_controller.rb +3 -0
  15. data/app/controllers/app_frame/devise/registrations_controller.rb +3 -0
  16. data/app/controllers/app_frame/devise/sessions_controller.rb +3 -0
  17. data/app/helpers/app_frame/bootstrap_helper.rb +36 -0
  18. data/app/helpers/app_frame/breadcrumb_helper.rb +18 -0
  19. data/app/helpers/app_frame/menu_helper.rb +43 -0
  20. data/app/helpers/app_frame/pagination_helper.rb +12 -0
  21. data/app/helpers/app_frame/resources_helper.rb +63 -0
  22. data/app/helpers/app_frame/scopes_helper.rb +94 -0
  23. data/app/helpers/app_frame/select_helper.rb +8 -0
  24. data/app/helpers/app_frame/tree_nav_helper.rb +18 -0
  25. data/app/models/menu.rb +44 -0
  26. data/app/models/settings.rb +4 -0
  27. data/app/views/app_frame/devise/confirmations/new.html.haml +8 -0
  28. data/app/views/app_frame/devise/passwords/edit.html.haml +13 -0
  29. data/app/views/app_frame/devise/passwords/new.html.haml +8 -0
  30. data/app/views/app_frame/devise/registrations/edit.html.haml +19 -0
  31. data/app/views/app_frame/devise/registrations/new.html.haml +10 -0
  32. data/app/views/app_frame/devise/sessions/new.html.haml +12 -0
  33. data/app/views/app_frame/devise/shared/_links.html.haml +14 -0
  34. data/app/views/app_frame/devise/unlocks/new.html.haml +9 -0
  35. data/app/views/application/_brand.html.haml +1 -0
  36. data/app/views/application/_breadcrumb.html.haml +12 -0
  37. data/app/views/application/_flashes.html.haml +2 -0
  38. data/app/views/application/_form.html.haml +2 -0
  39. data/app/views/application/_head.html.haml +6 -0
  40. data/app/views/application/_secondary_menu.html.haml +3 -0
  41. data/app/views/application/_show.html.haml +5 -0
  42. data/app/views/application/_sidebar.html.haml +12 -0
  43. data/app/views/application/_sub_menu.html.haml +0 -0
  44. data/app/views/application/_table.html.haml +3 -0
  45. data/app/views/application/_toolbar.html.haml +7 -0
  46. data/app/views/application/_top_menu.html.haml +1 -0
  47. data/app/views/application/edit.html.haml +8 -0
  48. data/app/views/application/index.html.haml +8 -0
  49. data/app/views/application/new.html.haml +7 -0
  50. data/app/views/application/show.html.haml +10 -0
  51. data/app/views/kaminari/app_frame/_first_page.html.haml +9 -0
  52. data/app/views/kaminari/app_frame/_gap.html.haml +8 -0
  53. data/app/views/kaminari/app_frame/_last_page.html.haml +9 -0
  54. data/app/views/kaminari/app_frame/_next_page.html.haml +9 -0
  55. data/app/views/kaminari/app_frame/_page.html.haml +10 -0
  56. data/app/views/kaminari/app_frame/_paginator.html.haml +19 -0
  57. data/app/views/kaminari/app_frame/_prev_page.html.haml +9 -0
  58. data/app/views/layouts/app_frame/default.html.haml +33 -0
  59. data/app/views/layouts/app_frame/devise.html.haml +17 -0
  60. data/app_frame.gemspec +162 -0
  61. data/lib/app_frame.rb +27 -0
  62. data/lib/app_frame/controller_methods.rb +111 -0
  63. data/lib/app_frame/view_methods.rb +19 -0
  64. data/lib/assets/images/.gitkeep +0 -0
  65. data/lib/assets/javascripts/anytime.js +3716 -0
  66. data/lib/assets/stylesheets/anytime.css +777 -0
  67. data/lib/engine.rb +197 -0
  68. data/spec/app_frame_spec.rb +7 -0
  69. data/spec/spec_helper.rb +12 -0
  70. metadata +423 -0
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,26 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'bootstrap-sass', '~> 2.3.1.0'
4
+ gem 'devise'
5
+ gem 'display_for', '0.1.12'
6
+ gem 'haml-rails'
7
+ gem 'inherited_resources'
8
+ gem 'kaminari'
9
+ gem 'nested_form', :git => 'git://github.com/ryanb/nested_form.git'
10
+ gem 'nested_set'
11
+ gem 'sass-rails'
12
+ gem 'settingslogic'
13
+ gem 'simple_form'
14
+ gem 'select2-rails'
15
+ gem 'squeel'
16
+
17
+ # Add dependencies to develop your gem here.
18
+ # Include everything needed to run rake, tests, features, etc.
19
+ group :test, :development do
20
+ gem "rails", "~> 3.2.13"
21
+ gem "rspec-rails"
22
+ gem "bundler", '~> 1.3.4'
23
+ gem "jeweler", "~> 1.8.4"
24
+ gem "simplecov"
25
+ gem 'log_buddy'
26
+ end
@@ -0,0 +1,181 @@
1
+ GIT
2
+ remote: git://github.com/ryanb/nested_form.git
3
+ revision: 8655e352c8f8dd26a6918e72f6d152954b65676a
4
+ specs:
5
+ nested_form (0.3.1)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actionmailer (3.2.13)
11
+ actionpack (= 3.2.13)
12
+ mail (~> 2.5.3)
13
+ actionpack (3.2.13)
14
+ activemodel (= 3.2.13)
15
+ activesupport (= 3.2.13)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.4)
19
+ rack (~> 1.4.5)
20
+ rack-cache (~> 1.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.2.1)
23
+ activemodel (3.2.13)
24
+ activesupport (= 3.2.13)
25
+ builder (~> 3.0.0)
26
+ activerecord (3.2.13)
27
+ activemodel (= 3.2.13)
28
+ activesupport (= 3.2.13)
29
+ arel (~> 3.0.2)
30
+ tzinfo (~> 0.3.29)
31
+ activeresource (3.2.13)
32
+ activemodel (= 3.2.13)
33
+ activesupport (= 3.2.13)
34
+ activesupport (3.2.13)
35
+ i18n (= 0.6.1)
36
+ multi_json (~> 1.0)
37
+ arel (3.0.2)
38
+ bcrypt-ruby (3.0.1)
39
+ bootstrap-sass (2.3.1.0)
40
+ sass (~> 3.2)
41
+ builder (3.0.4)
42
+ devise (2.2.3)
43
+ bcrypt-ruby (~> 3.0)
44
+ orm_adapter (~> 0.1)
45
+ railties (~> 3.1)
46
+ warden (~> 1.2.1)
47
+ diff-lcs (1.1.3)
48
+ display_for (0.1.12)
49
+ erubis (2.7.0)
50
+ git (1.2.5)
51
+ haml (3.1.7)
52
+ haml-rails (0.3.5)
53
+ actionpack (>= 3.1, < 4.1)
54
+ activesupport (>= 3.1, < 4.1)
55
+ haml (~> 3.1)
56
+ railties (>= 3.1, < 4.1)
57
+ has_scope (0.5.1)
58
+ hike (1.2.1)
59
+ i18n (0.6.1)
60
+ inherited_resources (1.3.1)
61
+ has_scope (~> 0.5.0)
62
+ responders (~> 0.6)
63
+ jeweler (1.8.4)
64
+ bundler (~> 1.0)
65
+ git (>= 1.2.5)
66
+ rake
67
+ rdoc
68
+ journey (1.0.4)
69
+ json (1.7.7)
70
+ kaminari (0.14.1)
71
+ actionpack (>= 3.0.0)
72
+ activesupport (>= 3.0.0)
73
+ log_buddy (0.7.0)
74
+ mail (2.5.3)
75
+ i18n (>= 0.4.0)
76
+ mime-types (~> 1.16)
77
+ treetop (~> 1.4.8)
78
+ mime-types (1.21)
79
+ multi_json (1.7.1)
80
+ nested_set (1.7.1)
81
+ activerecord (>= 3.0.0)
82
+ railties (>= 3.0.0)
83
+ orm_adapter (0.4.0)
84
+ polyamorous (0.5.0)
85
+ activerecord (~> 3.0)
86
+ polyglot (0.3.3)
87
+ rack (1.4.5)
88
+ rack-cache (1.2)
89
+ rack (>= 0.4)
90
+ rack-ssl (1.3.3)
91
+ rack
92
+ rack-test (0.6.2)
93
+ rack (>= 1.0)
94
+ rails (3.2.13)
95
+ actionmailer (= 3.2.13)
96
+ actionpack (= 3.2.13)
97
+ activerecord (= 3.2.13)
98
+ activeresource (= 3.2.13)
99
+ activesupport (= 3.2.13)
100
+ bundler (~> 1.0)
101
+ railties (= 3.2.13)
102
+ railties (3.2.13)
103
+ actionpack (= 3.2.13)
104
+ activesupport (= 3.2.13)
105
+ rack-ssl (~> 1.3.2)
106
+ rake (>= 0.8.7)
107
+ rdoc (~> 3.4)
108
+ thor (>= 0.14.6, < 2.0)
109
+ rake (10.0.3)
110
+ rdoc (3.12.2)
111
+ json (~> 1.4)
112
+ responders (0.9.3)
113
+ railties (~> 3.1)
114
+ rspec-core (2.12.2)
115
+ rspec-expectations (2.12.1)
116
+ diff-lcs (~> 1.1.3)
117
+ rspec-mocks (2.12.2)
118
+ rspec-rails (2.12.2)
119
+ actionpack (>= 3.0)
120
+ activesupport (>= 3.0)
121
+ railties (>= 3.0)
122
+ rspec-core (~> 2.12.0)
123
+ rspec-expectations (~> 2.12.0)
124
+ rspec-mocks (~> 2.12.0)
125
+ sass (3.2.5)
126
+ sass-rails (3.2.6)
127
+ railties (~> 3.2.0)
128
+ sass (>= 3.1.10)
129
+ tilt (~> 1.3)
130
+ select2-rails (3.3.1)
131
+ sass-rails (>= 3.2)
132
+ thor (~> 0.14)
133
+ settingslogic (2.0.9)
134
+ simple_form (2.0.4)
135
+ actionpack (~> 3.0)
136
+ activemodel (~> 3.0)
137
+ simplecov (0.7.1)
138
+ multi_json (~> 1.0)
139
+ simplecov-html (~> 0.7.1)
140
+ simplecov-html (0.7.1)
141
+ sprockets (2.2.2)
142
+ hike (~> 1.2)
143
+ multi_json (~> 1.0)
144
+ rack (~> 1.0)
145
+ tilt (~> 1.1, != 1.3.0)
146
+ squeel (1.0.18)
147
+ activerecord (~> 3.0)
148
+ activesupport (~> 3.0)
149
+ polyamorous (~> 0.5.0)
150
+ thor (0.17.0)
151
+ tilt (1.3.6)
152
+ treetop (1.4.12)
153
+ polyglot
154
+ polyglot (>= 0.3.1)
155
+ tzinfo (0.3.37)
156
+ warden (1.2.1)
157
+ rack (>= 1.0)
158
+
159
+ PLATFORMS
160
+ ruby
161
+
162
+ DEPENDENCIES
163
+ bootstrap-sass (~> 2.3.1.0)
164
+ bundler (~> 1.3.4)
165
+ devise
166
+ display_for (= 0.1.12)
167
+ haml-rails
168
+ inherited_resources
169
+ jeweler (~> 1.8.4)
170
+ kaminari
171
+ log_buddy
172
+ nested_form!
173
+ nested_set
174
+ rails (~> 3.2.13)
175
+ rspec-rails
176
+ sass-rails
177
+ select2-rails
178
+ settingslogic
179
+ simple_form
180
+ simplecov
181
+ squeel
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Mateo Murphy
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,25 @@
1
+ # app_frame
2
+
3
+ [![Dependency Status](https://gemnasium.com/mateomurphy/app_frame.png)](https://gemnasium.com/mateomurphy/app_frame)
4
+
5
+ A skeleton for rails apps
6
+
7
+ ## To do
8
+
9
+ * Reduce configuration required by menu system
10
+
11
+ ## Contributing to app_frame
12
+
13
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
14
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
15
+ * Fork the project
16
+ * Start a feature/bugfix branch
17
+ * Commit and push until you are happy with your contribution
18
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
19
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
20
+
21
+ ## Copyright
22
+
23
+ Copyright (c) 2011-2012 Mateo Murphy. See LICENSE.txt for
24
+ further details.
25
+
@@ -0,0 +1,47 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "app_frame"
16
+ gem.homepage = "http://github.com/mateomurphy/app_frame"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{An app framework}
19
+ gem.description = %Q{An app framework}
20
+ gem.email = "mateo.murphy@gmail.com"
21
+ gem.authors = ["Mateo Murphy"]
22
+ # dependencies defined in Gemfile
23
+ end
24
+ Jeweler::RubygemsDotOrgTasks.new
25
+
26
+ require 'rspec/core'
27
+ require 'rspec/core/rake_task'
28
+ RSpec::Core::RakeTask.new(:spec) do |spec|
29
+ spec.pattern = FileList['spec/**/*_spec.rb']
30
+ end
31
+
32
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
33
+ spec.pattern = 'spec/**/*_spec.rb'
34
+ spec.rcov = true
35
+ end
36
+
37
+ task :default => :spec
38
+
39
+ require 'rdoc/task'
40
+ RDoc::Task.new do |rdoc|
41
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
42
+
43
+ rdoc.rdoc_dir = 'rdoc'
44
+ rdoc.title = "app_frame #{version}"
45
+ rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.5.5
@@ -0,0 +1,9 @@
1
+ /*
2
+ * app_frame/application.js
3
+ */
4
+ //= require jquery
5
+ //= require jquery_ujs
6
+ //= require anytime
7
+ //= require bootstrap
8
+ //= require jquery_nested_form
9
+ //= require select2
@@ -0,0 +1,41 @@
1
+ #devise {
2
+ padding-top: 40px;
3
+ padding-bottom: 40px;
4
+ background-color: #f5f5f5;
5
+
6
+ .page-header {
7
+ margin: 0;
8
+ border: 0;
9
+ }
10
+
11
+ .container {
12
+ max-width: 376px;
13
+ margin: 0 auto 20px;
14
+ }
15
+
16
+ .box {
17
+ padding: 20px 30px;
18
+ background-color: #fff;
19
+ border: 1px solid #e5e5e5;
20
+ -webkit-border-radius: 5px;
21
+ -moz-border-radius: 5px;
22
+ border-radius: 5px;
23
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
24
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
25
+ box-shadow: 0 1px 2px rgba(0,0,0,.05);
26
+ }
27
+
28
+ .links {
29
+ padding: 19px 29px 19px;
30
+ ul {
31
+ margin: 0;
32
+ list-style: none;
33
+ }
34
+ }
35
+
36
+ input[type=text], input[type=password], input[type=email] {
37
+ width: 300px;
38
+ }
39
+
40
+
41
+ }
@@ -0,0 +1,31 @@
1
+ .tree {
2
+ width: 600px;
3
+
4
+ ul {
5
+ margin: 0;
6
+ border-bottom: 1px solid #ccc;
7
+ }
8
+
9
+ ul ul {
10
+ margin-left: 20px;
11
+ border-bottom: 0;
12
+ }
13
+
14
+ li {
15
+ list-style:none;
16
+ border-top: 1px solid #ccc;
17
+ padding: 10px;
18
+ }
19
+
20
+ .tree_nav {
21
+ float: right;
22
+
23
+ a, span {
24
+ padding: 0 4px;
25
+ }
26
+
27
+ span {
28
+ color: #eee;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,73 @@
1
+ /*
2
+ *= require anytime
3
+ *= require select2
4
+ */
5
+
6
+ @import 'bootstrap';
7
+ #main, .sidebar { margin-top:50px; }
8
+ @import 'bootstrap-responsive';
9
+ @import 'tree';
10
+ @import 'devise';
11
+
12
+ .container-fluid > .sidebar {
13
+ position: absolute;
14
+ top: 0;
15
+ left: auto;
16
+ right: 20px;
17
+ width: 260px;
18
+ }
19
+
20
+ .container-fluid > .content {
21
+ margin-left: 0px;
22
+ margin-right: 280px;
23
+ }
24
+
25
+ table .last {
26
+ width: 100px;
27
+ }
28
+
29
+ td.last {
30
+ text-align:center;
31
+ }
32
+
33
+ select {
34
+ width: auto;
35
+ }
36
+
37
+ .page-actions {
38
+ float: right;
39
+ padding-top: 4px;
40
+ }
41
+
42
+ .page-range {
43
+ float: right;
44
+ }
45
+
46
+
47
+ input[type=text], input[type=url], textarea, select, .cke_skin_kama {
48
+ width: 700px;
49
+ }
50
+
51
+ input.search-query {
52
+ width: 300px;
53
+ }
54
+
55
+ .select2-container {
56
+ width: 700px;
57
+ }
58
+
59
+ select.date {
60
+ width: auto;
61
+ }
62
+
63
+ .btn-toolbar {
64
+ margin-bottom: 20px;
65
+ form {
66
+ margin: 0;
67
+ }
68
+ }
69
+
70
+ .debug_dump {
71
+ display: block;
72
+ }
73
+