magis 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -0
- data/Rakefile +2 -0
- data/bin/magis +83 -0
- data/boilerplate/plugin/Gemfile +4 -0
- data/boilerplate/plugin/Gemfile.lock +17 -0
- data/boilerplate/plugin/LICENSE.txt +22 -0
- data/boilerplate/plugin/README.md +29 -0
- data/boilerplate/plugin/Rakefile +2 -0
- data/boilerplate/plugin/lib/your_spi_plugin.rb +8 -0
- data/boilerplate/plugin/lib/your_spi_plugin/version.rb +3 -0
- data/boilerplate/plugin/pkg/your_spi_plugin-0.0.1.gem +0 -0
- data/boilerplate/plugin/pkg/your_spi_plugin-1.0.1.gem +0 -0
- data/boilerplate/plugin/pkg/your_spi_plugin2-1.0.1.gem +0 -0
- data/boilerplate/plugin/your_spi_plugin.gemspec +23 -0
- data/boilerplate/project/Gemfile +1 -0
- data/boilerplate/project/Gemfile.lock +129 -0
- data/boilerplate/project/assets/javascripts/application.coffee +9 -0
- data/boilerplate/project/assets/stylesheets/application.css +9 -0
- data/boilerplate/project/collections/documentation.yml +2 -0
- data/boilerplate/project/config.ru +3 -0
- data/boilerplate/project/config/app.yml +1 -0
- data/boilerplate/project/config/database.yml +1 -0
- data/boilerplate/project/config/facebook.yml +3 -0
- data/boilerplate/project/config/google.yml +3 -0
- data/boilerplate/project/config/twitter.yml +3 -0
- data/boilerplate/project/data/json/documentation.json +6 -0
- data/boilerplate/project/public/index.html +40 -0
- data/boilerplate/project/public/pages/authentication.html +14 -0
- data/boilerplate/project/public/pages/documentation.html +8 -0
- data/lib/magis.rb +72 -0
- data/lib/magis/auths/fb.rb +71 -0
- data/lib/magis/auths/google.rb +56 -0
- data/lib/magis/auths/twitter.rb +52 -0
- data/lib/magis/base.rb +108 -0
- data/lib/magis/collection.rb +47 -0
- data/lib/magis/collections.rb +80 -0
- data/lib/magis/version.rb +3 -0
- data/lib/magis/web.rb +138 -0
- data/magis/html/setup.html +82 -0
- data/magis/js/current_user.js +10 -0
- data/magis/js/finch.min.js +14 -0
- data/magis/js/main.js +112 -0
- data/magis/js/setup.js +16 -0
- metadata +409 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ff9ed6792421aeb63a3b916ed3bb4b8513516b4e
|
4
|
+
data.tar.gz: 4c41aa28fe501c39f3d64f4f0f11f6af89cea0ff
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 23172a5ee5872cda54e240e43120b0ad659d4a2efc5fa458cee3bdad6922fdff246abfa5604293082fe68cf9a68ece1a594115725a2d59305db48f216db7a0bb
|
7
|
+
data.tar.gz: f27672e3dbca9a1d0b442b88f3c7594d40e1c414e0ee5140bebb35feb0c7019f1c6374ff0e8080e74f99fa7d1aff806b8385bf24b14271ea1d74287989e3f55a
|
data/README.md
ADDED
data/Rakefile
ADDED
data/bin/magis
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (c) 2014 Carson Wright
|
4
|
+
#
|
5
|
+
require 'fileutils'
|
6
|
+
require 'active_support/inflector'
|
7
|
+
spec = Gem::Specification.find_by_name("magis")
|
8
|
+
gem_root = spec.gem_dir
|
9
|
+
gem_lib = gem_root + "/lib"
|
10
|
+
|
11
|
+
|
12
|
+
case ARGV[0]
|
13
|
+
when "new"
|
14
|
+
puts "Creating your app!"
|
15
|
+
local_path = File.expand_path("..", File.dirname(__FILE__))
|
16
|
+
|
17
|
+
type = ARGV[1] == "plugin" ? "plugin" : "project"
|
18
|
+
name = type == "project" ? ARGV[1] : ARGV[2]
|
19
|
+
FileUtils.cp_r local_path + "/boilerplate/#{type}", name
|
20
|
+
|
21
|
+
if type == "plugin"
|
22
|
+
Dir.glob("#{ARGV[2]}/**/*your_magis_plugin*").each do |file_name|
|
23
|
+
new_file_name = file_name.gsub(/your_magis_plugin/, ARGV[2].underscore)
|
24
|
+
File.rename(file_name, new_file_name)
|
25
|
+
end
|
26
|
+
|
27
|
+
Dir.glob("#{ARGV[2]}/*your_magis_plugin*").each do |file_name|
|
28
|
+
new_file_name = file_name.gsub(/your_magis_plugin/, ARGV[2].underscore)
|
29
|
+
File.rename(file_name, new_file_name)
|
30
|
+
end
|
31
|
+
|
32
|
+
Dir.glob("#{ARGV[2]}/lib/#{ARGV[2].underscore}/*.rb").each do |file_name|
|
33
|
+
text = File.read(file_name)
|
34
|
+
text = text.gsub(/YourMagisPlugin/, ARGV[2].camelcase)
|
35
|
+
text = text.gsub(/your_magis_plugin/, ARGV[2].underscore)
|
36
|
+
|
37
|
+
f = File.new(file_name, "w")
|
38
|
+
f.write(text)
|
39
|
+
f.close
|
40
|
+
|
41
|
+
File.write(file_name, text)
|
42
|
+
end
|
43
|
+
|
44
|
+
Dir.glob("#{ARGV[2]}/lib/*.rb").each do |file_name|
|
45
|
+
text = File.read(file_name)
|
46
|
+
text = text.gsub(/YourMagisPlugin/, ARGV[2].camelcase)
|
47
|
+
text = text.gsub(/your_magis_plugin/, ARGV[2].underscore)
|
48
|
+
|
49
|
+
f = File.new(file_name, "w")
|
50
|
+
f.write(text)
|
51
|
+
f.close
|
52
|
+
|
53
|
+
File.write(file_name, text)
|
54
|
+
end
|
55
|
+
|
56
|
+
Dir.glob("#{ARGV[2]}/*.*").each do |file_name|
|
57
|
+
text = File.read(file_name)
|
58
|
+
text = text.gsub(/YourMagisPlugin/, ARGV[2].camelcase)
|
59
|
+
text = text.gsub(/your_magis_plugin/, ARGV[2].underscore)
|
60
|
+
|
61
|
+
f = File.new(file_name, "w")
|
62
|
+
f.write(text)
|
63
|
+
f.close
|
64
|
+
|
65
|
+
File.write(file_name, text)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
when "setup"
|
69
|
+
ENV['RACK_ENV']="setup"
|
70
|
+
exec("puma")
|
71
|
+
when "server"
|
72
|
+
ENV['RACK_ENV']="development"
|
73
|
+
exec("puma")
|
74
|
+
when "test"
|
75
|
+
ENV['RACK_ENV']="test"
|
76
|
+
exec("puma")
|
77
|
+
else
|
78
|
+
puts "Please pass an argument"
|
79
|
+
puts "Your options are:"
|
80
|
+
puts " New - To create an application"
|
81
|
+
puts " Server - To run a server"
|
82
|
+
end
|
83
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Hashrocket Workstation
|
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.
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# YourMagisPlugin
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'your_magis_plugin'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install your_magis_plugin
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( https://github.com/[my-github-username]/your_magis_plugin/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create a new Pull Request
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'your_magis_plugin/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "your_magis_plugin"
|
8
|
+
spec.version = YourMagisPlugin::VERSION
|
9
|
+
spec.authors = ["Hashrocket Workstation"]
|
10
|
+
spec.email = ["dev@hashrocket.com"]
|
11
|
+
spec.summary = %q{ Write a short summary. Required.}
|
12
|
+
spec.description = %q{ Write a longer description. Optional.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = Dir["lib/**/*"]
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
gem 'magis'
|
@@ -0,0 +1,129 @@
|
|
1
|
+
GEM
|
2
|
+
specs:
|
3
|
+
activesupport-inflector (0.1.0)
|
4
|
+
addressable (2.3.6)
|
5
|
+
bson (1.11.1)
|
6
|
+
bson_ext (1.11.1)
|
7
|
+
bson (~> 1.11.1)
|
8
|
+
coffee-script (2.3.0)
|
9
|
+
coffee-script-source
|
10
|
+
execjs
|
11
|
+
coffee-script-source (1.8.0)
|
12
|
+
cookiejar (0.3.2)
|
13
|
+
em-http-request (1.1.2)
|
14
|
+
addressable (>= 2.3.4)
|
15
|
+
cookiejar
|
16
|
+
em-socksify (>= 0.3)
|
17
|
+
eventmachine (>= 1.0.3)
|
18
|
+
http_parser.rb (>= 0.6.0)
|
19
|
+
em-socksify (0.3.0)
|
20
|
+
eventmachine (>= 1.0.0.beta.4)
|
21
|
+
eventmachine (1.0.3)
|
22
|
+
execjs (2.2.1)
|
23
|
+
faraday (0.9.0)
|
24
|
+
multipart-post (>= 1.2, < 3)
|
25
|
+
faye (1.0.3)
|
26
|
+
cookiejar (>= 0.3.0)
|
27
|
+
em-http-request (>= 0.3.0)
|
28
|
+
eventmachine (>= 0.12.0)
|
29
|
+
faye-websocket (>= 0.7.0)
|
30
|
+
multi_json (>= 1.0.0)
|
31
|
+
rack (>= 1.0.0)
|
32
|
+
websocket-driver (>= 0.3.0)
|
33
|
+
faye-websocket (0.7.4)
|
34
|
+
eventmachine (>= 0.12.0)
|
35
|
+
websocket-driver (>= 0.3.1)
|
36
|
+
hashie (3.3.1)
|
37
|
+
hike (1.2.3)
|
38
|
+
http_parser.rb (0.6.0)
|
39
|
+
i18n (0.6.11)
|
40
|
+
json (1.8.1)
|
41
|
+
jwt (1.0.0)
|
42
|
+
koala (1.10.1)
|
43
|
+
addressable
|
44
|
+
faraday
|
45
|
+
multi_json
|
46
|
+
magis (0.0.1)
|
47
|
+
activesupport-inflector (= 0.1.0)
|
48
|
+
bson_ext (= 1.11.1)
|
49
|
+
faye (= 1.0.3)
|
50
|
+
i18n (= 0.6.11)
|
51
|
+
json (= 1.8.1)
|
52
|
+
koala (= 1.10.1)
|
53
|
+
mongo (= 1.11.1)
|
54
|
+
omniauth (= 1.2.2)
|
55
|
+
omniauth-facebook (= 2.0.0)
|
56
|
+
omniauth-google-oauth2 (= 0.2.5)
|
57
|
+
omniauth-oauth2 (= 1.2.0)
|
58
|
+
omniauth-twitter (= 1.0.1)
|
59
|
+
puma (= 2.9.1)
|
60
|
+
sinatra (= 1.4.5)
|
61
|
+
sinatra-asset-pipeline (= 0.5.0)
|
62
|
+
mongo (1.11.1)
|
63
|
+
bson (= 1.11.1)
|
64
|
+
multi_json (1.10.1)
|
65
|
+
multi_xml (0.5.5)
|
66
|
+
multipart-post (2.0.0)
|
67
|
+
oauth (0.4.7)
|
68
|
+
oauth2 (1.0.0)
|
69
|
+
faraday (>= 0.8, < 0.10)
|
70
|
+
jwt (~> 1.0)
|
71
|
+
multi_json (~> 1.3)
|
72
|
+
multi_xml (~> 0.5)
|
73
|
+
rack (~> 1.2)
|
74
|
+
omniauth (1.2.2)
|
75
|
+
hashie (>= 1.2, < 4)
|
76
|
+
rack (~> 1.0)
|
77
|
+
omniauth-facebook (2.0.0)
|
78
|
+
omniauth-oauth2 (~> 1.2)
|
79
|
+
omniauth-google-oauth2 (0.2.5)
|
80
|
+
omniauth (> 1.0)
|
81
|
+
omniauth-oauth2 (~> 1.1)
|
82
|
+
omniauth-oauth (1.0.1)
|
83
|
+
oauth
|
84
|
+
omniauth (~> 1.0)
|
85
|
+
omniauth-oauth2 (1.2.0)
|
86
|
+
faraday (>= 0.8, < 0.10)
|
87
|
+
multi_json (~> 1.3)
|
88
|
+
oauth2 (~> 1.0)
|
89
|
+
omniauth (~> 1.2)
|
90
|
+
omniauth-twitter (1.0.1)
|
91
|
+
multi_json (~> 1.3)
|
92
|
+
omniauth-oauth (~> 1.0)
|
93
|
+
puma (2.9.1)
|
94
|
+
rack (>= 1.1, < 2.0)
|
95
|
+
rack (1.5.2)
|
96
|
+
rack-protection (1.5.3)
|
97
|
+
rack
|
98
|
+
rake (10.3.2)
|
99
|
+
sass (3.4.5)
|
100
|
+
sinatra (1.4.5)
|
101
|
+
rack (~> 1.4)
|
102
|
+
rack-protection (~> 1.4)
|
103
|
+
tilt (~> 1.3, >= 1.3.4)
|
104
|
+
sinatra-asset-pipeline (0.5.0)
|
105
|
+
coffee-script
|
106
|
+
rake
|
107
|
+
sass
|
108
|
+
sinatra
|
109
|
+
sprockets
|
110
|
+
sprockets-helpers
|
111
|
+
sprockets-sass
|
112
|
+
sprockets (2.12.2)
|
113
|
+
hike (~> 1.2)
|
114
|
+
multi_json (~> 1.0)
|
115
|
+
rack (~> 1.0)
|
116
|
+
tilt (~> 1.1, != 1.3.0)
|
117
|
+
sprockets-helpers (1.1.0)
|
118
|
+
sprockets (~> 2.0)
|
119
|
+
sprockets-sass (1.2.0)
|
120
|
+
sprockets (~> 2.0)
|
121
|
+
tilt (~> 1.1)
|
122
|
+
tilt (1.4.1)
|
123
|
+
websocket-driver (0.3.4)
|
124
|
+
|
125
|
+
PLATFORMS
|
126
|
+
ruby
|
127
|
+
|
128
|
+
DEPENDENCIES
|
129
|
+
magis
|
@@ -0,0 +1 @@
|
|
1
|
+
session_secret: "YOUR SESSION SECRET"
|
@@ -0,0 +1 @@
|
|
1
|
+
name: exampleName
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
4
|
+
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" />
|
5
|
+
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
6
|
+
<script type="text/javascript" src="http://localhost:9292/faye/client.js"></script>
|
7
|
+
<link href="http://bootswatch.com/cerulean/bootstrap.min.css" rel="stylesheet" />
|
8
|
+
<script src='http://cdn.ractivejs.org/latest/ractive.js'></script>
|
9
|
+
<script src="/magis.js"></script>
|
10
|
+
<script src="/assets/application.js"></script>
|
11
|
+
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
|
12
|
+
<link href="/assets/application.css" rel="stylesheet" />
|
13
|
+
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<div class="navbar navbar-default navbar-fixed-top">
|
17
|
+
<div class="navbar-header">
|
18
|
+
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
|
19
|
+
<span class="sr-only">Toggle navigation</span>
|
20
|
+
<span class="icon-bar"></span>
|
21
|
+
<span class="icon-bar"></span>
|
22
|
+
<span class="icon-bar"></span>
|
23
|
+
</button>
|
24
|
+
<a href="/" class="navbar-brand">Your Application</a>
|
25
|
+
</div>
|
26
|
+
<div class="container">
|
27
|
+
<ul class="nav navbar-nav">
|
28
|
+
<li>
|
29
|
+
<a href="#/documentation">Documentation</a>
|
30
|
+
</li>
|
31
|
+
</ul>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<div class="container">
|
35
|
+
<div class="main">
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</body>
|
39
|
+
</html>
|
40
|
+
|