Skip to content

Commit

Permalink
Merge pull request #21 from spartansystems/upload_field
Browse files Browse the repository at this point in the history
Upload field
  • Loading branch information
Mrjaco12 committed Oct 15, 2015
2 parents e0575bd + a15203c commit f4f6036
Show file tree
Hide file tree
Showing 63 changed files with 1,304 additions and 221 deletions.
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
'env': {
'browser': true,
'node': true
},
'globals': {
'window': true,
'document': true,
'jQuery': true,
'$': true,
'angular': true
},
'rules': {
'quotes': [2, 'single', 'avoid-escape']
}
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
.bundle/
log/*.log
pkg/
*.gem
*.DS_Store
*.keep
spec/dummy/db/*.sqlite3
spec/dummy/db/*.sqlite3-journal
spec/dummy/log/*.log
spec/dummy/tmp/
spec/dummy/.sass-cache
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
38 changes: 35 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PATH
angularjs-rails (~> 1.3, < 1.4)
atomic_assets (~> 0.0.4)
jquery-rails (~> 4.0, >= 4.0.3)
paperclip (~> 4.3)
rails (~> 4.2)
redcarpet (~> 3.3)
slim-rails (~> 3.0)
Expand Down Expand Up @@ -71,6 +72,10 @@ GEM
sass (~> 3.4)
thor (~> 0.19)
builder (3.2.2)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.7)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
Expand All @@ -86,6 +91,11 @@ GEM
request_store (~> 1.0)
erubis (2.7.0)
execjs (2.6.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
formtastic (3.1.3)
actionpack (>= 3.2.13)
formtastic_i18n (0.4.1)
Expand Down Expand Up @@ -115,10 +125,17 @@ GEM
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.2)
mimemagic (0.3.0)
mini_portile (0.6.2)
minitest (5.8.1)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
paperclip (4.3.1)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (= 0.3.0)
polyamorous (1.2.0)
activerecord (>= 3.0)
rack (1.6.4)
Expand Down Expand Up @@ -155,7 +172,7 @@ GEM
activesupport (>= 3.0)
i18n
polyamorous (~> 1.2)
redcarpet (3.3.2)
redcarpet (3.3.3)
request_store (1.2.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
Expand All @@ -167,6 +184,14 @@ GEM
rspec-mocks (3.3.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-rails (3.3.3)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
sass (3.4.18)
sass-rails (5.0.4)
Expand All @@ -175,6 +200,8 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
shoulda-matchers (3.0.0)
activesupport (>= 4.0.0)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
Expand All @@ -184,12 +211,13 @@ GEM
activesupport (>= 3.1, < 5.0)
railties (>= 3.1, < 5.0)
slim (~> 3.0)
sprockets (3.3.4)
rack (~> 1.0)
sprockets (3.4.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.11)
temple (0.7.6)
thor (0.19.1)
thread_safe (0.3.5)
Expand All @@ -202,10 +230,14 @@ PLATFORMS

DEPENDENCIES
atomic_cms!
factory_girl_rails
rspec-core (~> 3.3)
rspec-expectations (~> 3.3)
rspec-mocks (~> 3.3)
rspec-rails
rspec-support (~> 3.3)
shoulda-matchers
sqlite3

BUNDLED WITH
1.10.6
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,22 @@ this is properly imported:
#### Routes
Update your `config/routes.rb` to include the following:
```ruby
mount AtomicCms::Engine => "/atomic_cms"
mount AtomicCms::Engine => "/atomic_cms", as: :atomic_cms
get "*path", to: "pages#show", controller: "pages", as: :page, format: false
root to: 'pages#show', controller: "pages"
```
The last two lines need to be at the **END** of your `routes.rb` file.

##### Devise Authentication
Change the mount point above to be the following:
```ruby
authenticate :admin_user, -> (u) { u.admin? } do
mount AtomicCms::Engine => "/atomic_cms", as: :atomic_cms
end
```
where `u` is the user and `admin?` the authentication method you have on that
user; it should return a boolean value.

#### Model
Execute the following to create a model for your static pages:
```ruby
Expand Down Expand Up @@ -318,7 +329,6 @@ Update `config/application.rb` to include:
```ruby
config.autoload_paths += %W(#{config.root}/lib, #{config.root}/app/components/**/)
```

### Gotcha's
When creating a path for a page, from the examples above, make sure to include a
leading '/', for example: '/home' -or- '/bears'
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'
Bundler::GemHelper.install_tasks
Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
require 'rspec/core'
require 'rspec/core/rake_task'
desc "Run all specs in spec directory (excluding plugin specs)"
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
task :default => :spec
Loading

0 comments on commit f4f6036

Please sign in to comment.