nightlight 0.0.1

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 (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +112 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +63 -0
  7. data/Rakefile +2 -0
  8. data/app/assets/fonts/nightlight/FontAwesome.otf +0 -0
  9. data/app/assets/fonts/nightlight/fontawesome-webfont.eot +0 -0
  10. data/app/assets/fonts/nightlight/fontawesome-webfont.svg +399 -0
  11. data/app/assets/fonts/nightlight/fontawesome-webfont.ttf +0 -0
  12. data/app/assets/fonts/nightlight/fontawesome-webfont.woff +0 -0
  13. data/app/assets/javascripts/nightlight/application.js +2 -0
  14. data/app/assets/javascripts/nightlight/jquery.min.js +4 -0
  15. data/app/assets/javascripts/nightlight/jquery_ujs.js +469 -0
  16. data/app/assets/stylesheets/nightlight/application.css +14 -0
  17. data/app/assets/stylesheets/nightlight/bootstrap.min.css +5 -0
  18. data/app/assets/stylesheets/nightlight/font-awesome.min.css +403 -0
  19. data/app/assets/stylesheets/nightlight/pages.css +30 -0
  20. data/app/controllers/nightlight/activities_controller.rb +29 -0
  21. data/app/controllers/nightlight/base_controller.rb +16 -0
  22. data/app/controllers/nightlight/pages_controller.rb +132 -0
  23. data/app/helpers/nightlight/pages_helper.rb +24 -0
  24. data/app/models/nightlight/activity.rb +38 -0
  25. data/app/models/nightlight/page.rb +43 -0
  26. data/app/views/layouts/nightlight/_alert.html.erb +11 -0
  27. data/app/views/layouts/nightlight/application.html.erb +20 -0
  28. data/app/views/nightlight/pages/_activity.html.erb +19 -0
  29. data/app/views/nightlight/pages/_brightness.html.erb +3 -0
  30. data/app/views/nightlight/pages/_form.html.erb +34 -0
  31. data/app/views/nightlight/pages/_pages.html.erb +42 -0
  32. data/app/views/nightlight/pages/add.js.erb +13 -0
  33. data/app/views/nightlight/pages/edit.html.erb +17 -0
  34. data/app/views/nightlight/pages/index.html.erb +50 -0
  35. data/app/views/nightlight/pages/new.html.erb +11 -0
  36. data/app/views/nightlight/pages/show.html.erb +67 -0
  37. data/config/routes.rb +16 -0
  38. data/lib/generators/nightlight/install_generator.rb +29 -0
  39. data/lib/generators/nightlight/templates/install.rb +23 -0
  40. data/lib/nightlight/engine.rb +11 -0
  41. data/lib/nightlight/version.rb +3 -0
  42. data/lib/nightlight.rb +9 -0
  43. data/nightlight.gemspec +25 -0
  44. metadata +129 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f5e7d1152629e208b9d0ea11ab788b8c9569add9
4
+ data.tar.gz: 07d1c0028a88ebcaf5be49bbe7a5fa9b431f0bca
5
+ SHA512:
6
+ metadata.gz: 6bc362c658af258b64c31ce7e206e71d633a3d61c73e9106dbd5b6eb842c37a827d33dfe13aed17e3066f0a73aebbe962d085b3a35325d4e427a190059dbe56d
7
+ data.tar.gz: 8f65234757a690c21cb157cf00f9e38a0846ff83feb9bd5e6461fc67f750031b647c64f3172462ebd877c26219798664bb0142eaa7c61ba9a1bcf943e6229484
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.bundle
10
+ *.so
11
+ *.o
12
+ *.a
13
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in nightlight.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,112 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ nightlight (0.0.1)
5
+ rails
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionmailer (4.2.0)
11
+ actionpack (= 4.2.0)
12
+ actionview (= 4.2.0)
13
+ activejob (= 4.2.0)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ actionpack (4.2.0)
17
+ actionview (= 4.2.0)
18
+ activesupport (= 4.2.0)
19
+ rack (~> 1.6.0)
20
+ rack-test (~> 0.6.2)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
23
+ actionview (4.2.0)
24
+ activesupport (= 4.2.0)
25
+ builder (~> 3.1)
26
+ erubis (~> 2.7.0)
27
+ rails-dom-testing (~> 1.0, >= 1.0.5)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
29
+ activejob (4.2.0)
30
+ activesupport (= 4.2.0)
31
+ globalid (>= 0.3.0)
32
+ activemodel (4.2.0)
33
+ activesupport (= 4.2.0)
34
+ builder (~> 3.1)
35
+ activerecord (4.2.0)
36
+ activemodel (= 4.2.0)
37
+ activesupport (= 4.2.0)
38
+ arel (~> 6.0)
39
+ activesupport (4.2.0)
40
+ i18n (~> 0.7)
41
+ json (~> 1.7, >= 1.7.7)
42
+ minitest (~> 5.1)
43
+ thread_safe (~> 0.3, >= 0.3.4)
44
+ tzinfo (~> 1.1)
45
+ arel (6.0.0)
46
+ builder (3.2.2)
47
+ erubis (2.7.0)
48
+ globalid (0.3.0)
49
+ activesupport (>= 4.1.0)
50
+ hike (1.2.3)
51
+ i18n (0.7.0)
52
+ json (1.8.2)
53
+ loofah (2.0.1)
54
+ nokogiri (>= 1.5.9)
55
+ mail (2.6.3)
56
+ mime-types (>= 1.16, < 3)
57
+ mime-types (2.4.3)
58
+ mini_portile (0.6.2)
59
+ minitest (5.5.1)
60
+ multi_json (1.10.1)
61
+ nokogiri (1.6.5)
62
+ mini_portile (~> 0.6.0)
63
+ rack (1.6.0)
64
+ rack-test (0.6.3)
65
+ rack (>= 1.0)
66
+ rails (4.2.0)
67
+ actionmailer (= 4.2.0)
68
+ actionpack (= 4.2.0)
69
+ actionview (= 4.2.0)
70
+ activejob (= 4.2.0)
71
+ activemodel (= 4.2.0)
72
+ activerecord (= 4.2.0)
73
+ activesupport (= 4.2.0)
74
+ bundler (>= 1.3.0, < 2.0)
75
+ railties (= 4.2.0)
76
+ sprockets-rails
77
+ rails-deprecated_sanitizer (1.0.3)
78
+ activesupport (>= 4.2.0.alpha)
79
+ rails-dom-testing (1.0.5)
80
+ activesupport (>= 4.2.0.beta, < 5.0)
81
+ nokogiri (~> 1.6.0)
82
+ rails-deprecated_sanitizer (>= 1.0.1)
83
+ rails-html-sanitizer (1.0.1)
84
+ loofah (~> 2.0)
85
+ railties (4.2.0)
86
+ actionpack (= 4.2.0)
87
+ activesupport (= 4.2.0)
88
+ rake (>= 0.8.7)
89
+ thor (>= 0.18.1, < 2.0)
90
+ rake (10.4.2)
91
+ sprockets (2.12.3)
92
+ hike (~> 1.2)
93
+ multi_json (~> 1.0)
94
+ rack (~> 1.0)
95
+ tilt (~> 1.1, != 1.3.0)
96
+ sprockets-rails (2.2.2)
97
+ actionpack (>= 3.0)
98
+ activesupport (>= 3.0)
99
+ sprockets (>= 2.8, < 4.0)
100
+ thor (0.19.1)
101
+ thread_safe (0.3.4)
102
+ tilt (1.4.1)
103
+ tzinfo (1.2.2)
104
+ thread_safe (~> 0.1)
105
+
106
+ PLATFORMS
107
+ ruby
108
+
109
+ DEPENDENCIES
110
+ bundler (~> 1.7)
111
+ nightlight!
112
+ rake (~> 10.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Benjamin Sullivan
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Nightlight
2
+
3
+ Shed light on the dark corners of your app
4
+
5
+ Nightlight helps you make sure all pages in your app are getting the love and attention they deserve
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'nightlight'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install nightlight
22
+
23
+ Run the install generator:
24
+
25
+ ```sh
26
+ rails g nightlight:install
27
+ rake db:migrate
28
+ ```
29
+
30
+ And mount the dashboard in your `config/routes.rb`:
31
+
32
+ ```ruby
33
+ mount Nightlight::Engine, at: "nightlight"
34
+ ```
35
+
36
+ ## Authentication
37
+
38
+ Don’t forget to protect the dashboard in production.
39
+
40
+ ### Basic Authentication
41
+
42
+ Set the following variables in your environment or an initializer.
43
+
44
+ ```ruby
45
+ ENV["NIGHTLIGHT_USERNAME"] = "ben"
46
+ ENV["NIGHTLIGHT_PASSWORD"] = "secret"
47
+ ```
48
+
49
+ ### Devise
50
+
51
+ ```ruby
52
+ authenticate :user, lambda{|user| user.admin? } do
53
+ mount Nightlight::Engine, at: "nightlight"
54
+ end
55
+ ```
56
+
57
+ ## Contributing
58
+
59
+ 1. Fork it ( https://github.com/bonsaiben/nightlight/fork )
60
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
61
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
62
+ 4. Push to the branch (`git push origin my-new-feature`)
63
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+