ants 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -11
- data/app/assets/javascripts/ants/admins.coffee +53 -0
- data/app/assets/javascripts/ants/redirects.coffee +23 -0
- data/app/assets/javascripts/ants.coffee +1 -2
- data/app/models/admin.rb +1 -1
- data/lib/ants/version.rb +1 -1
- metadata +5 -5
- data/app/assets/javascripts/chr/admins.coffee +0 -44
- data/app/assets/javascripts/chr/redirects.coffee +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8072151f9881c54d6d51d563bee240aa5ec3ea3
|
4
|
+
data.tar.gz: 35573aec450297203ca30dcce476357f00b95480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655608bf9b6ed33ddce2a4d124ba0f3d69a0afddb521daf3fb1c419b60689c87f5a5e167e530b0c36fa32fee043e4a7c1ddfeb80689937bf7224dd73d15d8fb2
|
7
|
+
data.tar.gz: b94386d8dfcd3e2c9e8cb32b1d33aa07bf05682be84d491a41af49571846f9766b3cf93bab764d93f8d6e3dfaec9650cdfbcc5db4c8362a9c2815b0c1d1a4c08
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ants (0.2.
|
4
|
+
ants (0.2.3)
|
5
5
|
devise
|
6
6
|
mongoid (>= 4.0)
|
7
7
|
mongoid-slug (>= 4.0.0)
|
@@ -46,9 +46,8 @@ GEM
|
|
46
46
|
tzinfo (~> 1.1)
|
47
47
|
arel (6.0.3)
|
48
48
|
bcrypt (3.1.10)
|
49
|
-
bson (3.2.
|
49
|
+
bson (3.2.6)
|
50
50
|
builder (3.2.2)
|
51
|
-
connection_pool (2.2.0)
|
52
51
|
coveralls (0.8.2)
|
53
52
|
json (~> 1.8)
|
54
53
|
rest-client (>= 1.6.8, < 2)
|
@@ -80,22 +79,23 @@ GEM
|
|
80
79
|
mime-types (2.6.1)
|
81
80
|
mini_portile (0.6.2)
|
82
81
|
minitest (5.8.0)
|
83
|
-
|
82
|
+
mongo (2.1.2)
|
83
|
+
bson (~> 3.0)
|
84
|
+
mongoid (5.0.1)
|
84
85
|
activemodel (~> 4.0)
|
85
|
-
|
86
|
+
mongo (~> 2.1)
|
86
87
|
origin (~> 2.1)
|
87
88
|
tzinfo (>= 0.3.37)
|
88
|
-
mongoid-
|
89
|
+
mongoid-compatibility (0.3.1)
|
90
|
+
activesupport
|
91
|
+
mongoid (>= 2.0)
|
92
|
+
mongoid-slug (5.1.1)
|
89
93
|
mongoid (>= 3.0)
|
94
|
+
mongoid-compatibility
|
90
95
|
stringex (~> 2.0)
|
91
|
-
moped (2.0.7)
|
92
|
-
bson (~> 3.0)
|
93
|
-
connection_pool (~> 2.0)
|
94
|
-
optionable (~> 0.2.0)
|
95
96
|
netrc (0.10.3)
|
96
97
|
nokogiri (1.6.6.2)
|
97
98
|
mini_portile (~> 0.6.0)
|
98
|
-
optionable (0.2.0)
|
99
99
|
origin (2.1.1)
|
100
100
|
orm_adapter (0.5.0)
|
101
101
|
rack (1.6.4)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
class @AntsAdmins
|
2
|
+
constructor: (title='Admins', apiPath='/admin') ->
|
3
|
+
config =
|
4
|
+
title: title
|
5
|
+
showWithParent: true
|
6
|
+
|
7
|
+
arrayStore: new RailsArrayStore({
|
8
|
+
resource: 'admin'
|
9
|
+
path: "#{ apiPath }/admins"
|
10
|
+
sortBy: 'name'
|
11
|
+
searchable: true
|
12
|
+
})
|
13
|
+
|
14
|
+
formSchema:
|
15
|
+
name:
|
16
|
+
type: 'string'
|
17
|
+
required: true
|
18
|
+
label: "Name"
|
19
|
+
placeholder: 'Full name'
|
20
|
+
onInitialize: (input) ->
|
21
|
+
if input.object
|
22
|
+
input.$el.removeClass 'input-required'
|
23
|
+
input.config.disabled = true
|
24
|
+
input._add_disabled()
|
25
|
+
|
26
|
+
email:
|
27
|
+
type: 'string'
|
28
|
+
required: true
|
29
|
+
placeholder: 'Email'
|
30
|
+
|
31
|
+
onInitialize: (input) ->
|
32
|
+
if input.object
|
33
|
+
input.$el.removeClass 'input-required'
|
34
|
+
input.config.disabled = true
|
35
|
+
input._add_disabled()
|
36
|
+
|
37
|
+
input.$actions =$ "<span class='input-actions'></span>"
|
38
|
+
input.$avatarBtn =$ "<a href='https://en.gravatar.com/' target='_blank'>Update avatar</a>"
|
39
|
+
input.$label.append input.$actions
|
40
|
+
input.$actions.append input.$avatarBtn
|
41
|
+
|
42
|
+
password:
|
43
|
+
type: 'password'
|
44
|
+
required: true
|
45
|
+
placeholder: 'Password'
|
46
|
+
onInitialize: (input) ->
|
47
|
+
if input.object
|
48
|
+
input.$el.removeClass 'input-required'
|
49
|
+
input.$label.html 'Change Password'
|
50
|
+
input.config.placeholder = 'Type new password here to update the current one'
|
51
|
+
input._add_placeholder()
|
52
|
+
|
53
|
+
return config
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class @AntsRedirects
|
2
|
+
constructor: (title='Redirects', apiPath='/admin') ->
|
3
|
+
config =
|
4
|
+
title: title
|
5
|
+
showWithParent: true
|
6
|
+
|
7
|
+
onViewShow: (view) ->
|
8
|
+
if view.object
|
9
|
+
view.$linkBtn =$ "<a href='#{ view.object.path_from }' class='link open' target='_blank'>Open</a>"
|
10
|
+
view.$header.append view.$linkBtn
|
11
|
+
|
12
|
+
arrayStore: new RailsArrayStore({
|
13
|
+
resource: 'redirect'
|
14
|
+
path: "#{ apiPath }/redirects"
|
15
|
+
sortBy: 'path_from'
|
16
|
+
searchable: true
|
17
|
+
})
|
18
|
+
|
19
|
+
formSchema:
|
20
|
+
path_from: { type: 'string', label: 'From', placeholder: '/redirect-from-path', required: true }
|
21
|
+
path_to: { type: 'url', label: 'To', placeholder: '/redirect-to-path', required: true }
|
22
|
+
|
23
|
+
return config
|
@@ -1,2 +1 @@
|
|
1
|
-
#=
|
2
|
-
#= require chr/redirects
|
1
|
+
#= require_tree ./ants
|
data/app/models/admin.rb
CHANGED
data/lib/ants/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kravets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -154,8 +154,8 @@ files:
|
|
154
154
|
- Rakefile
|
155
155
|
- ants.gemspec
|
156
156
|
- app/assets/javascripts/ants.coffee
|
157
|
-
- app/assets/javascripts/
|
158
|
-
- app/assets/javascripts/
|
157
|
+
- app/assets/javascripts/ants/admins.coffee
|
158
|
+
- app/assets/javascripts/ants/redirects.coffee
|
159
159
|
- app/assets/stylesheets/ants.scss
|
160
160
|
- app/assets/stylesheets/chr/header.scss
|
161
161
|
- app/controllers/admin/admins_controller.rb
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project: ants
|
207
|
-
rubygems_version: 2.4.
|
207
|
+
rubygems_version: 2.4.5.1
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Collection of concerns for Rails + Mongoid + Character web development
|
@@ -1,44 +0,0 @@
|
|
1
|
-
@Ants ||= {}
|
2
|
-
|
3
|
-
Ants.adminsConfig = ->
|
4
|
-
showWithParent: true
|
5
|
-
|
6
|
-
arrayStore: new RailsArrayStore({
|
7
|
-
resource: 'admin'
|
8
|
-
path: '/admin/admins'
|
9
|
-
sortBy: 'name'
|
10
|
-
searchable: true
|
11
|
-
})
|
12
|
-
|
13
|
-
formSchema:
|
14
|
-
name:
|
15
|
-
type: 'string'
|
16
|
-
required: true
|
17
|
-
label: """Name <small>— to update or add avatar, please register on
|
18
|
-
<a href='http://gravatar.com' target='_blank'>Gravatar</a>
|
19
|
-
using same email address</small>"""
|
20
|
-
placeholder: 'Full name'
|
21
|
-
onInitialize: (input) ->
|
22
|
-
if input.object
|
23
|
-
input.$el.removeClass 'input-required'
|
24
|
-
input.config.disabled = true
|
25
|
-
input._add_disabled()
|
26
|
-
|
27
|
-
email:
|
28
|
-
type: 'string'
|
29
|
-
required: true
|
30
|
-
onInitialize: (input) ->
|
31
|
-
if input.object
|
32
|
-
input.$el.removeClass 'input-required'
|
33
|
-
input.config.disabled = true
|
34
|
-
input._add_disabled()
|
35
|
-
|
36
|
-
password:
|
37
|
-
type: 'password'
|
38
|
-
required: true
|
39
|
-
onInitialize: (input) ->
|
40
|
-
if input.object
|
41
|
-
input.$el.removeClass 'input-required'
|
42
|
-
input.$label.html 'Change Password'
|
43
|
-
input.config.placeholder = 'Type new password here to update the current one'
|
44
|
-
input._add_placeholder()
|
@@ -1,20 +0,0 @@
|
|
1
|
-
@Ants ||= {}
|
2
|
-
|
3
|
-
Ants.redirectsConfig = ->
|
4
|
-
showWithParent: true
|
5
|
-
|
6
|
-
onViewShow: (view) ->
|
7
|
-
if view.object
|
8
|
-
view.$linkBtn =$ "<a href='#{ view.object.path_from }' class='link open' target='_blank'>Open</a>"
|
9
|
-
view.$header.append view.$linkBtn
|
10
|
-
|
11
|
-
arrayStore: new RailsArrayStore({
|
12
|
-
resource: 'redirect'
|
13
|
-
path: '/admin/redirects'
|
14
|
-
sortBy: 'path_from'
|
15
|
-
searchable: true
|
16
|
-
})
|
17
|
-
|
18
|
-
formSchema:
|
19
|
-
path_from: { type: 'string', label: 'From', placeholder: '/redirect-from-path', required: true }
|
20
|
-
path_to: { type: 'url', label: 'To', placeholder: '/redirect-to-path', required: true }
|