activate-admin 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzFlMTY0ZTljYmU2NTZiMzY5NDg3Zjk5ODQ5ZDZhZmMzM2I2M2NmZg==
5
+ data.tar.gz: !binary |-
6
+ NmM4NGFhZjNlYTdmZmRlYjkzMzg0NDg3ZmRhZTcyNDk4NTk2NmI3Yw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MjhjZGJiNDkwN2YzOTZlMThiZDEzOWZhNjAyYTRmN2I4ODM4OTg5YjM2NDM2
10
+ N2M1ODVhYzdiNWI4NjliNGE0MzdmNTZhYjE1ODU4ZWM4Y2IwYmJkMTJiOGU3
11
+ NDM2ZjVkNzdiOTUxN2UxODc5MmIzMWY3OTgyZThjNjdiZTgwODE=
12
+ data.tar.gz: !binary |-
13
+ ZGQ2MWZkM2I3Zjg3ODI2MWUyMWQwYTZiZmI3NjFjMzAzNjY4NTU0NTk5YzBi
14
+ YmQwMWU5ZGY3NmVlNmIwZmExYWMzZWVhNzRkNTM2MDVhZjE3MjJiN2MzZmVk
15
+ YzAxOGI5MzhlYjliNTNhZDI0MjhlYjlhZmY4YWMyZTkyYjk0NzI=
data/README.md CHANGED
@@ -51,4 +51,4 @@ def filter_options
51
51
  :d => 'desc'
52
52
  }
53
53
  end
54
- ```
54
+ ```
@@ -12,8 +12,12 @@ Gem::Specification.new do |gem|
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
14
  gem.name = "activate-admin"
15
- gem.require_paths = ["lib", "app"]
15
+ gem.require_paths = ["lib"]
16
16
  gem.version = ActivateAdmin::VERSION
17
17
 
18
- gem.add_dependency "padrino-core"
18
+ gem.add_dependency 'padrino', '0.11.1'
19
+ gem.add_dependency 'sinatra-assetpack'
20
+ gem.add_dependency 'sinatra-simple-navigation'
21
+ gem.add_dependency 'kaminari'
22
+ gem.add_dependency 'actionpack', '4.0.0.beta1'
19
23
  end
data/admin/app.rb CHANGED
@@ -4,9 +4,8 @@ module ActivateAdmin
4
4
  register Padrino::Helpers
5
5
  register Sinatra::SimpleNavigation
6
6
  helpers Kaminari::Helpers::SinatraHelpers
7
- helpers DatetimeHelpers
8
- helpers ParamHelpers
9
- use Dragonfly::Middleware, :dragonfly
7
+ helpers ActivateAdmin::DatetimeHelpers
8
+ helpers ActivateAdmin::ParamHelpers
10
9
 
11
10
  enable :sessions
12
11
  set :show_exceptions, true
@@ -36,7 +35,7 @@ module ActivateAdmin
36
35
  }
37
36
 
38
37
  before do
39
- redirect url_for(:login) unless [url_for(:login), url_for(:logout)].include?(request.path) or (current_account and current_account.role == 'admin')
38
+ redirect url_for(:login) unless [url_for(:login), url_for(:logout)].any? { |p| p == request.path } or ['css','js','fonts'].any? { |p| request.path.starts_with? "#{ActivateAdmin::App.uri_root}/#{p}" } or (current_account and current_account.role == 'admin')
40
39
  fix_params!
41
40
  Time.zone = current_account.time_zone if current_account and current_account.time_zone
42
41
  end
@@ -50,23 +49,24 @@ module ActivateAdmin
50
49
  @q, @f, @o, @d, = model.filter_options[:q], model.filter_options[:f], model.filter_options[:o], model.filter_options[:d]
51
50
  end
52
51
  @q = params[:q] if params[:q]
53
- @qf = params[:qf] if params[:qf]
54
52
  @f = params[:f] if params[:f]
55
53
  @o = params[:o].to_sym if params[:o]
56
54
  @d = params[:d].to_sym if params[:d]
57
55
  @resources = model.all
58
- if @qf == 'search'
59
- @resources = @resources.or(model.fields.map { |field| {field[0] => /#{@q}/i } if field[1].type == String and !field[0].starts_with?('_') }.compact)
60
- elsif @qf == 'eval'
61
- @resources = eval("@resources.#{@q}")
62
- end
63
- @f.each { |k,v|
64
- if model.fields[k] and v
65
- if model.fields[k].type == Boolean
66
- @resources = (v == 'true' ? @resources.where(k.to_sym => true) : @resources.where(k.to_sym.ne => true))
67
- else
68
- @resources = @resources.where(k.to_sym => /#{v}/i)
69
- end
56
+ q = []
57
+ model.fields.each { |fieldstring, fieldobj|
58
+ if fieldobj.type == String and !fieldstring.starts_with?('_')
59
+ q << {fieldstring.to_sym => /#{@q}/i }
60
+ elsif fieldstring.ends_with?('_id') && fieldstring != '_id' && Object.const_defined?((assoc_name = fieldstring.gsub('_id','').camelize))
61
+ q << {"#{assoc_name.underscore}_id".to_sym.in => assoc_name.constantize.where(assoc_name.constantize.send(:lookup) => /#{@q}/i).only(:_id).map(&:_id) }
62
+ end
63
+ }
64
+ @resources = @resources.or(q)
65
+ @f.each { |k,v|
66
+ if model.fields[k].type == String
67
+ @resources = @resources.where(k.to_sym => /#{v}/i)
68
+ elsif k.ends_with?('_id') && Object.const_defined?((assoc_name = k.gsub('_id','').camelize))
69
+ @resources = @resources.where({"#{assoc_name.underscore}_id".to_sym.in => assoc_name.constantize.where(assoc_name.constantize.send(:lookup) => /#{v}/i).only(:_id).map(&:_id) })
70
70
  end
71
71
  } if @f
72
72
  @resources = @resources.order_by(@o.to_sym.send(@d)) if @o and @d
@@ -5,7 +5,7 @@ ActivateAdmin::App.helpers do
5
5
  end
6
6
 
7
7
  def models
8
- ENV['MODELS'] ? (ENV['MODELS'].split(',').map { |x| x.constantize }) : (Dir.entries("#{PADRINO_ROOT}/models").select { |filename| filename.ends_with?('.rb') }.map { |filename| filename.split('.rb').first.camelize.constantize })
8
+ ENV['ACTIVATE_ADMIN_MODELS'] ? (ENV['ACTIVATE_ADMIN_MODELS'].split(',').map { |x| x.constantize }) : (Dir.entries("#{PADRINO_ROOT}/models").select { |filename| filename.ends_with?('.rb') }.map { |filename| filename.split('.rb').first.camelize.constantize })
9
9
  end
10
10
 
11
11
  def model
@@ -80,13 +80,13 @@
80
80
  <% when :select %>
81
81
  <%= f.select fieldname, :class => "input-xxlarge", :options => model.send(fieldname.to_s.pluralize) %>
82
82
  <% when :lookup %>
83
- <%= f.select fieldname, :class => "input-xxlarge", :options => ['']+fieldname.to_s.gsub('_id','').camelize.constantize.all.map { |x| [x.send(:lookup), x.id] }, :selected => (params[fieldname] || @resource.send(fieldname)) %>
83
+ <%= f.select fieldname, :class => "input-xxlarge", :options => ['']+(assoc_name = fieldname.to_s.gsub('_id','').camelize).constantize.all.map { |x| [x.send(assoc_name.constantize.send(:lookup)), x.id] }, :selected => (params[fieldname] || @resource.send(fieldname)) %>
84
84
  <% when :collection %>
85
85
  <ul class="unstyled">
86
86
  <% @resource.send(fieldname).each { |x| %>
87
- <li><a target="_blank" href="<%=url_for(:edit, :model => fieldname.to_s.singularize.camelize, :id => x.id)%>"><%=x.send(:lookup)%></a></li>
87
+ <li><a target="_blank" href="<%=url_for(:edit, :model => (assoc_name = fieldname.to_s.singularize.camelize), :id => x.id)%>"><%=x.send(assoc_name.constantize.send(:lookup))%></a></li>
88
88
  <% } %>
89
- <li><a class="btn" target="_blank" href="<%=url_for(:new, :model => fieldname.to_s.singularize.camelize, :"#{model.to_s.underscore}_id" => @resource.id)%>"><i class="icon-pencil"></i> New <%=fieldname.to_s.singularize.humanize.downcase%></a></li>
89
+ <li><a class="btn" target="_blank" href="<%=url_for(:new, :model => (assoc_name = fieldname.to_s.singularize.camelize), :"#{model.to_s.underscore}_id" => @resource.id)%>"><i class="icon-pencil"></i> New <%=fieldname.to_s.singularize.humanize.downcase%></a></li>
90
90
  </ul>
91
91
  <% else %>
92
92
  <%= f.text_field fieldname, :class => "input-xxlarge" %>
@@ -19,8 +19,7 @@
19
19
  <% } if @f %>
20
20
  <%= hidden_field_tag :o, :value => @o %>
21
21
  <%= hidden_field_tag :d, :value => @d %>
22
- <button type="submit" name="qf" value="search" class="btn">Search</button>
23
- <button type="submit" name="qf" value="eval" class="btn">Eval</button>
22
+ <%= submit_tag 'Search', :class => 'btn' %>
24
23
  </form>
25
24
  </div>
26
25
  </div>
@@ -70,7 +69,7 @@
70
69
 
71
70
  <% if @f and @f[fieldname] %>
72
71
  <a title="Searching for '<%=@f[fieldname]%>'; click to search again" href="javascript:;" class="f"><i class="icon-search"></i></a>
73
- <% else %>
72
+ <% elsif model.fields[fieldname.to_s].type == String or (fieldname.to_s.ends_with?('_id') && Object.const_defined?((assoc_name = fieldname.to_s.gsub('_id','').camelize))) %>
74
73
  <a title="Search in <%=fieldname%>" href="javascript:;" class="f fn"><i class="icon-search"></i></a>
75
74
  <% end %>
76
75
  </th>
@@ -84,9 +83,9 @@
84
83
  <tr>
85
84
  <% model.fields_for_index.each { |fieldname| %>
86
85
  <td>
87
- <% if fieldname.match(/_id/) && Object.const_defined?(fieldname.to_s.gsub('_id','').camelize) && resource.send(fieldname) %>
88
- <a target="_blank" href="<%=url_for(:edit, :model => fieldname.to_s.gsub('_id','').camelize.constantize, :id => resource.send(fieldname))%>"><%= fieldname.to_s.gsub('_id','').camelize.constantize.find(resource.send(fieldname)).lookup %></a>
89
- <% elsif fieldname.match(/_url/) %>
86
+ <% if fieldname.to_s.ends_with?('_id') && Object.const_defined?((assoc_name = fieldname.to_s.gsub('_id','').camelize)) && resource.send(fieldname) %>
87
+ <a target="_blank" href="<%=url_for(:edit, :model => assoc_name, :id => resource.send(fieldname))%>"><%= assoc_name.constantize.find(resource.send(fieldname)).send(assoc_name.constantize.send(:lookup)) %></a>
88
+ <% elsif fieldname.to_s.ends_with?('_url') %>
90
89
  <a href="<%=resource.send(fieldname)%>"><%=resource.send(fieldname)%></a>
91
90
  <% else %>
92
91
  <%= truncate(strip_tags(resource.send(fieldname).to_s), :length => 30) %>
@@ -19,8 +19,7 @@
19
19
 
20
20
  </head>
21
21
  <body>
22
- <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
23
-
22
+
24
23
  <div class="navbar navbar-fixed-top">
25
24
  <div class="navbar-inner">
26
25
  <div class="container-fluid">
@@ -32,7 +31,7 @@
32
31
  <a style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;" class="brand" href="<%=url_for(:home)%>">ActivateAdmin</a>
33
32
  <% if current_account %>
34
33
  <div class="nav-collapse">
35
- <%= render_navigation :items => models.map { |model|
34
+ <%= render_navigation :context => :activate_admin, :items => models.map { |model|
36
35
  {:key => :left, :name => human_model_name(model).pluralize, :url => url_for(:index, :model => model.to_s), :options => {:container_class => 'nav'}}
37
36
  }
38
37
  %>
@@ -1,3 +1,3 @@
1
1
  module ActivateAdmin
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -1,6 +1,18 @@
1
- require 'padrino-core'
1
+ require 'csv'
2
+
3
+ require 'padrino'
4
+ require 'sinatra/assetpack'
5
+ require 'sinatra/simple-navigation'
6
+ require 'kaminari/sinatra'
7
+
8
+ require 'assetpack_patch'
9
+ require 'kaminari_patch'
10
+ require 'datetime_helpers'
11
+ require 'param_helpers'
2
12
 
3
13
  module ActivateAdmin
4
14
  extend Padrino::Module
5
15
  gem! "activate-admin"
6
- end
16
+ end
17
+
18
+ SimpleNavigation::config_file_paths << "#{ActivateAdmin.root}/lib"
@@ -1,4 +1,4 @@
1
- module DatetimeHelpers
1
+ module ActivateAdmin::DatetimeHelpers
2
2
 
3
3
  def datetime_select_tags(name, options)
4
4
  v = options[:value] || Time.zone.now
File without changes
data/lib/param_helpers.rb CHANGED
@@ -1,4 +1,4 @@
1
- module ParamHelpers
1
+ module ActivateAdmin::ParamHelpers
2
2
 
3
3
  def fix_params!
4
4
  datetime_hashes_to_datetimes!(params)
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activate-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Stephen Reid
@@ -12,9 +11,36 @@ cert_chain: []
12
11
  date: 2013-04-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: padrino-core
14
+ name: padrino
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.11.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.11.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: sinatra-assetpack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sinatra-simple-navigation
16
43
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
44
  requirements:
19
45
  - - ! '>='
20
46
  - !ruby/object:Gem::Version
@@ -22,11 +48,38 @@ dependencies:
22
48
  type: :runtime
23
49
  prerelease: false
24
50
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
51
  requirements:
27
52
  - - ! '>='
28
53
  - !ruby/object:Gem::Version
29
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: kaminari
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: actionpack
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 4.0.0.beta1
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 4.0.0.beta1
30
83
  description: An admin gem for Padrino/mongoid
31
84
  email:
32
85
  - postscript07@gmail.com
@@ -34,13 +87,8 @@ executables: []
34
87
  extensions: []
35
88
  extra_rdoc_files: []
36
89
  files:
37
- - .components
38
90
  - .gitignore
39
- - Gemfile
40
- - Gemfile.lock
41
- - Procfile
42
91
  - README.md
43
- - Rakefile
44
92
  - activate-admin.gemspec
45
93
  - admin/app.rb
46
94
  - admin/assets/fonts/FontAwesome.otf
@@ -64,18 +112,11 @@ files:
64
112
  - admin/views/index.erb
65
113
  - admin/views/layouts/application.erb
66
114
  - admin/views/login_page.erb
67
- - config.ru
68
- - config/apps.rb
69
- - config/boot.rb
70
- - config/mongoid.yml
71
- - config/navigation.rb
72
115
  - lib/activate-admin.rb
73
116
  - lib/activate-admin/version.rb
117
+ - lib/activate_admin_navigation.rb
74
118
  - lib/assetpack_patch.rb
75
- - lib/date_formats.rb
76
119
  - lib/datetime_helpers.rb
77
- - lib/dragonfly.rb
78
- - lib/kaminari.rb
79
120
  - lib/kaminari/_first_page.html.erb
80
121
  - lib/kaminari/_gap.html.erb
81
122
  - lib/kaminari/_last_page.html.erb
@@ -83,31 +124,30 @@ files:
83
124
  - lib/kaminari/_page.html.erb
84
125
  - lib/kaminari/_paginator.html.erb
85
126
  - lib/kaminari/_prev_page.html.erb
127
+ - lib/kaminari_patch.rb
86
128
  - lib/param_helpers.rb
87
129
  homepage: https://github.com/postscript07/activate-admin
88
130
  licenses: []
131
+ metadata: {}
89
132
  post_install_message:
90
133
  rdoc_options: []
91
134
  require_paths:
92
135
  - lib
93
- - app
94
136
  required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
137
  requirements:
97
138
  - - ! '>='
98
139
  - !ruby/object:Gem::Version
99
140
  version: '0'
100
141
  required_rubygems_version: !ruby/object:Gem::Requirement
101
- none: false
102
142
  requirements:
103
143
  - - ! '>='
104
144
  - !ruby/object:Gem::Version
105
145
  version: '0'
106
146
  requirements: []
107
147
  rubyforge_project:
108
- rubygems_version: 1.8.25
148
+ rubygems_version: 2.0.3
109
149
  signing_key:
110
- specification_version: 3
150
+ specification_version: 4
111
151
  summary: A powerful, lightweight admin gem for Padrino/mongoid with support for a
112
152
  variety of different field types
113
153
  test_files: []
data/.components DELETED
@@ -1,9 +0,0 @@
1
- ---
2
- :orm: mongoid
3
- :test: none
4
- :mock: none
5
- :script: jquery
6
- :renderer: erb
7
- :stylesheet: none
8
- :namespace: ActivateAdmin
9
- :migration_format: number
data/Gemfile DELETED
@@ -1,57 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- ruby '1.9.3'
4
- gem 'puma'
5
- gem 'padrino', '0.11.1'
6
- gem 'rake'
7
-
8
- # Asset pipeline
9
- gem 'sinatra-assetpack', :require => 'sinatra/assetpack'
10
-
11
- # Data storage
12
- gem 'mongoid', github: 'mongoid/mongoid'
13
- gem 'dragonfly'
14
- gem 'mongo' # MongoDataStore
15
- gem 'bson_ext' # MongoDataStore
16
- # gem 'fog' # S3DataStore
17
-
18
- # Authentication
19
- gem 'bcrypt-ruby', require: 'bcrypt'
20
- gem 'omniauth'
21
- gem 'omniauth-twitter'
22
- gem 'omniauth-facebook'
23
- gem 'omniauth-google-oauth2'
24
- gem 'omniauth-linkedin'
25
-
26
- # Timezones
27
- gem 'tzinfo'
28
-
29
- # Navigation
30
- gem 'sinatra-simple-navigation', require: 'sinatra/simple-navigation'
31
-
32
- # Pagination
33
- gem 'kaminari', require: 'kaminari/sinatra'
34
- gem 'actionpack', '4.0.0.beta1'
35
-
36
- # Autolinking
37
- # gem 'rinku'
38
-
39
- # Asynchronous tasks
40
- # gem 'delayed_job_mongoid'
41
-
42
- # Error reporting
43
- # gem 'airbrake'
44
- gem 'backtrace_shortener'
45
-
46
- # Interacting with other websites
47
- # gem 'mechanize'
48
- # gem 'pismo'
49
- # gem 'oauth'
50
- # gem 'twitter'
51
- # gem 'koala'
52
- # gem 'hominid'
53
-
54
- # Caching
55
- # gem 'rack-cache'
56
- # gem 'memcachier'
57
- # gem 'dalli'
data/Gemfile.lock DELETED
@@ -1,184 +0,0 @@
1
- GIT
2
- remote: git://github.com/mongoid/mongoid.git
3
- revision: 4a931ca105fddf59cc2f8619e973233376cf4b67
4
- specs:
5
- mongoid (4.0.0)
6
- activemodel (~> 4.0.0.beta)
7
- moped (~> 1.4.2)
8
- origin (~> 1.0)
9
- tzinfo (~> 0.3.22)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actionpack (4.0.0.beta1)
15
- activesupport (= 4.0.0.beta1)
16
- builder (~> 3.1.0)
17
- erubis (~> 2.7.0)
18
- rack (~> 1.5.2)
19
- rack-test (~> 0.6.2)
20
- activemodel (4.0.0.beta1)
21
- activesupport (= 4.0.0.beta1)
22
- builder (~> 3.1.0)
23
- activesupport (4.0.0.beta1)
24
- i18n (~> 0.6.2)
25
- minitest (~> 4.2)
26
- multi_json (~> 1.3)
27
- thread_safe (~> 0.1)
28
- tzinfo (~> 0.3.33)
29
- atomic (1.1.7)
30
- atomic (1.1.7-java)
31
- backports (3.3.0)
32
- backtrace_shortener (0.1.0)
33
- bcrypt-ruby (3.0.1)
34
- bcrypt-ruby (3.0.1-java)
35
- bson (1.8.5)
36
- bson (1.8.5-java)
37
- bson_ext (1.8.4)
38
- bson (~> 1.8.4)
39
- builder (3.1.4)
40
- dragonfly (0.9.14)
41
- multi_json (~> 1.0)
42
- rack
43
- erubis (2.7.0)
44
- faraday (0.8.7)
45
- multipart-post (~> 1.1)
46
- hashie (2.0.3)
47
- http_router (0.11.0)
48
- rack (>= 1.0.0)
49
- url_mount (~> 0.2.1)
50
- httpauth (0.2.0)
51
- i18n (0.6.4)
52
- jsmin (1.0.1)
53
- jwt (0.1.8)
54
- multi_json (>= 1.5)
55
- kaminari (0.14.1)
56
- actionpack (>= 3.0.0)
57
- activesupport (>= 3.0.0)
58
- mail (2.5.3)
59
- i18n (>= 0.4.0)
60
- mime-types (~> 1.16)
61
- treetop (~> 1.4.8)
62
- mime-types (1.22)
63
- minitest (4.7.1)
64
- mongo (1.8.5)
65
- bson (~> 1.8.5)
66
- moped (1.4.5)
67
- multi_json (1.7.2)
68
- multipart-post (1.2.0)
69
- oauth (0.4.7)
70
- oauth2 (0.8.1)
71
- faraday (~> 0.8)
72
- httpauth (~> 0.1)
73
- jwt (~> 0.1.4)
74
- multi_json (~> 1.0)
75
- rack (~> 1.2)
76
- omniauth (1.1.4)
77
- hashie (>= 1.2, < 3)
78
- rack
79
- omniauth-facebook (1.4.1)
80
- omniauth-oauth2 (~> 1.1.0)
81
- omniauth-google-oauth2 (0.1.13)
82
- omniauth (~> 1.0)
83
- omniauth-oauth2
84
- omniauth-linkedin (0.1.0)
85
- omniauth-oauth (~> 1.0)
86
- omniauth-oauth (1.0.1)
87
- oauth
88
- omniauth (~> 1.0)
89
- omniauth-oauth2 (1.1.1)
90
- oauth2 (~> 0.8.0)
91
- omniauth (~> 1.0)
92
- omniauth-twitter (0.0.16)
93
- multi_json (~> 1.3)
94
- omniauth-oauth (~> 1.0)
95
- origin (1.0.11)
96
- padrino (0.11.1)
97
- padrino-admin (= 0.11.1)
98
- padrino-cache (= 0.11.1)
99
- padrino-core (= 0.11.1)
100
- padrino-gen (= 0.11.1)
101
- padrino-helpers (= 0.11.1)
102
- padrino-mailer (= 0.11.1)
103
- padrino-admin (0.11.1)
104
- padrino-core (= 0.11.1)
105
- padrino-helpers (= 0.11.1)
106
- padrino-cache (0.11.1)
107
- padrino-core (= 0.11.1)
108
- padrino-helpers (= 0.11.1)
109
- padrino-core (0.11.1)
110
- activesupport (>= 3.1.0)
111
- http_router (~> 0.11.0)
112
- rack-protection (>= 1.5.0)
113
- sinatra (~> 1.4.2)
114
- thor (~> 0.17.0)
115
- tilt (~> 1.3.0)
116
- padrino-gen (0.11.1)
117
- bundler (~> 1.0)
118
- padrino-core (= 0.11.1)
119
- padrino-helpers (0.11.1)
120
- i18n (~> 0.6)
121
- padrino-core (= 0.11.1)
122
- padrino-mailer (0.11.1)
123
- mail (~> 2.5.3)
124
- padrino-core (= 0.11.1)
125
- polyglot (0.3.3)
126
- puma (1.6.3)
127
- rack (~> 1.2)
128
- puma (1.6.3-java)
129
- rack (~> 1.2)
130
- rack (1.5.2)
131
- rack-protection (1.5.0)
132
- rack
133
- rack-test (0.6.2)
134
- rack (>= 1.0)
135
- rake (10.0.4)
136
- simple-navigation (3.10.1)
137
- activesupport (>= 2.3.2)
138
- sinatra (1.4.2)
139
- rack (~> 1.5, >= 1.5.2)
140
- rack-protection (~> 1.4)
141
- tilt (~> 1.3, >= 1.3.4)
142
- sinatra-assetpack (0.2.1)
143
- backports
144
- jsmin
145
- rack-test
146
- sinatra
147
- tilt (>= 1.3.0)
148
- sinatra-simple-navigation (3.6.0)
149
- simple-navigation (>= 3.10.1)
150
- thor (0.17.0)
151
- thread_safe (0.1.0)
152
- atomic
153
- tilt (1.3.7)
154
- treetop (1.4.12)
155
- polyglot
156
- polyglot (>= 0.3.1)
157
- tzinfo (0.3.37)
158
- url_mount (0.2.1)
159
- rack
160
-
161
- PLATFORMS
162
- java
163
- ruby
164
-
165
- DEPENDENCIES
166
- actionpack (= 4.0.0.beta1)
167
- backtrace_shortener
168
- bcrypt-ruby
169
- bson_ext
170
- dragonfly
171
- kaminari
172
- mongo
173
- mongoid!
174
- omniauth
175
- omniauth-facebook
176
- omniauth-google-oauth2
177
- omniauth-linkedin
178
- omniauth-twitter
179
- padrino (= 0.11.1)
180
- puma
181
- rake
182
- sinatra-assetpack
183
- sinatra-simple-navigation
184
- tzinfo
data/Procfile DELETED
@@ -1 +0,0 @@
1
- web: bundle exec puma -t 1:4 -e $RACK_ENV -p $PORT
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler/setup'
2
- require 'padrino-core/cli/rake'
3
-
4
- PadrinoTasks.use(:database)
5
- PadrinoTasks.use(:mongoid)
6
- PadrinoTasks.init
data/config/apps.rb DELETED
@@ -1,5 +0,0 @@
1
- Padrino.configure_apps do
2
- set :session_secret, '278393b81379df7a348b399d004cfa8147999c5b75470b1946b4217724867722'
3
- end
4
-
5
- Padrino.mount('ActivateAdmin::App', :app_file => ActivateAdmin.root('admin/app.rb')).to('/')
data/config/boot.rb DELETED
@@ -1,26 +0,0 @@
1
- # Defines our constants
2
- PADRINO_ENV = ENV['PADRINO_ENV'] ||= ENV['RACK_ENV'] ||= 'development' unless defined?(PADRINO_ENV)
3
- PADRINO_ROOT = File.expand_path('../..', __FILE__) unless defined?(PADRINO_ROOT)
4
-
5
- # Load our dependencies
6
- require 'rubygems' unless defined?(Gem)
7
- require 'bundler/setup'
8
- require 'pp'
9
- require 'csv'
10
- require 'backtrace_shortener'
11
- BacktraceShortener.monkey_patch_the_exception_class!
12
- BacktraceShortener.filters.unshift(Proc.new do |backtrace|
13
- backtrace.reject { |line| line.include?(Gem.dir) }
14
- end)
15
- Bundler.require(:default, PADRINO_ENV)
16
-
17
- Padrino.before_load do
18
- end
19
-
20
- Padrino.after_load do
21
- end
22
-
23
- Padrino.load!
24
-
25
- Mongoid.load!("#{ActivateAdmin.root}/config/mongoid.yml")
26
- Mongoid.raise_not_found_error = false
data/config/mongoid.yml DELETED
@@ -1,14 +0,0 @@
1
- development:
2
- sessions:
3
- default:
4
- database: <%= File.basename(PADRINO_ROOT) %>
5
- hosts:
6
- - localhost:27017
7
-
8
- production:
9
- sessions:
10
- default:
11
- uri: <%= ENV['MONGOHQ_URL'] %>
12
- options:
13
- skip_version_check: true
14
- safe: true
data/config.ru DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env rackup
2
- # encoding: utf-8
3
-
4
- # This file can be used to start Padrino,
5
- # just execute it from the command line.
6
-
7
- require File.expand_path("../config/boot.rb", __FILE__)
8
-
9
- run Padrino.application
data/lib/date_formats.rb DELETED
@@ -1,11 +0,0 @@
1
- require 'active_support/core_ext/integer/inflections'
2
-
3
- Time::DATE_FORMATS.merge!(
4
- :default => lambda { |time| time.to_s(:date) + ', ' + time.to_s(:time) },
5
- :date => lambda { |time| time.to_date.to_s },
6
- :time => lambda { |time| time.strftime("#{(t = time.hour%12) == 0 ? 12 : t}:%M#{time.strftime('%p').downcase}") }
7
- )
8
-
9
- Date::DATE_FORMATS.merge!(
10
- :default => lambda { |date| date.strftime("%a #{date.day.ordinalize} %b %Y") }
11
- )
data/lib/dragonfly.rb DELETED
@@ -1,30 +0,0 @@
1
- if defined? Dragonfly
2
-
3
- app = Dragonfly[:dragonfly].configure_with(:imagemagick) do |c|
4
- c.url_format = '/media/:job/:basename.:format'
5
- end
6
-
7
- app.analyser.register(Dragonfly::Analysis::FileCommandAnalyser)
8
-
9
- if Padrino.env == :production
10
- # app.datastore = Dragonfly::DataStorage::S3DataStore.new
11
- # app.datastore.configure do |d|
12
- # d.bucket_name = ENV['S3_BUCKET_NAME']
13
- # d.access_key_id = ENV['S3_ACCESS_KEY']
14
- # d.secret_access_key = ENV['S3_SECRET']
15
- # end
16
- app.datastore = Dragonfly::DataStorage::MongoDataStore.new
17
- app.datastore.configure do |c|
18
- c.host = ENV['MONGOHQ_URL'].split('@').last.split(':').first
19
- c.port = ENV['MONGOHQ_URL'].split('@').last.split(':').last.split('/').first
20
- c.database = ENV['MONGOHQ_URL'].split('/')[3]
21
- c.username = ENV['MONGOHQ_URL'].split('://').last.split(':').first
22
- c.password = ENV['MONGOHQ_URL'].split('://').last.split('@').first.split(':').last
23
- end
24
- else
25
- app.datastore = Dragonfly::DataStorage::MongoDataStore.new
26
- end
27
-
28
- app.define_macro_on_include(Mongoid::Document, :dragonfly_accessor)
29
-
30
- end