devmate 0.0.1 → 0.1.0
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 +8 -8
- data/{LICENSE.txt → MIT-LICENSE} +1 -3
- data/README.rdoc +7 -0
- data/Rakefile +39 -1
- data/app/assets/javascripts/devmate/application.js +35 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/LICENSE.txt +20 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/jquery.noty.js +488 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottom.js +34 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottomCenter.js +41 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottomLeft.js +43 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottomRight.js +43 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/center.js +56 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/centerLeft.js +61 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/centerRight.js +61 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/inline.js +31 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/top.js +34 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/topCenter.js +41 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/topLeft.js +43 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/topRight.js +43 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/packaged/jquery.noty.packaged.js +1180 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/packaged/jquery.noty.packaged.min.js +1 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/promise.js +432 -0
- data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/themes/default.js +157 -0
- data/app/assets/stylesheets/devmate/application.css +13 -0
- data/app/controllers/devmate/application_controller.rb +26 -0
- data/app/helpers/devmate/application_helper.rb +4 -0
- data/app/views/layouts/devmate/application.html.erb +14 -0
- data/config/data/quotes.json +36 -0
- data/config/routes.rb +3 -0
- data/lib/devmate.rb +14 -4
- data/lib/devmate/engine.rb +5 -0
- data/lib/devmate/version.rb +1 -1
- data/lib/generators/devmate_generator.rb +27 -0
- data/test/devmate_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/functional/devmate/prompts_controller_test.rb +9 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +117 -30
- data/.gitignore +0 -22
- data/Gemfile +0 -4
- data/README.md +0 -29
- data/devmate.gemspec +0 -24
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.bottom = {
|
|
4
|
+
name: 'bottom',
|
|
5
|
+
options: {},
|
|
6
|
+
container: {
|
|
7
|
+
object: '<ul id="noty_bottom_layout_container" />',
|
|
8
|
+
selector: 'ul#noty_bottom_layout_container',
|
|
9
|
+
style: function() {
|
|
10
|
+
$(this).css({
|
|
11
|
+
bottom: 0,
|
|
12
|
+
left: '5%',
|
|
13
|
+
position: 'fixed',
|
|
14
|
+
width: '90%',
|
|
15
|
+
height: 'auto',
|
|
16
|
+
margin: 0,
|
|
17
|
+
padding: 0,
|
|
18
|
+
listStyleType: 'none',
|
|
19
|
+
zIndex: 9999999
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
parent: {
|
|
24
|
+
object: '<li />',
|
|
25
|
+
selector: 'li',
|
|
26
|
+
css: {}
|
|
27
|
+
},
|
|
28
|
+
css: {
|
|
29
|
+
display: 'none'
|
|
30
|
+
},
|
|
31
|
+
addClass: ''
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
})(jQuery);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.bottomCenter = {
|
|
4
|
+
name: 'bottomCenter',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_bottomCenter_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_bottomCenter_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
bottom: 20,
|
|
14
|
+
left: 0,
|
|
15
|
+
position: 'fixed',
|
|
16
|
+
width: '310px',
|
|
17
|
+
height: 'auto',
|
|
18
|
+
margin: 0,
|
|
19
|
+
padding: 0,
|
|
20
|
+
listStyleType: 'none',
|
|
21
|
+
zIndex: 10000000
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
$(this).css({
|
|
25
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
parent: {
|
|
30
|
+
object: '<li />',
|
|
31
|
+
selector: 'li',
|
|
32
|
+
css: {}
|
|
33
|
+
},
|
|
34
|
+
css: {
|
|
35
|
+
display: 'none',
|
|
36
|
+
width: '310px'
|
|
37
|
+
},
|
|
38
|
+
addClass: ''
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
})(jQuery);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.bottomLeft = {
|
|
4
|
+
name: 'bottomLeft',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_bottomLeft_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_bottomLeft_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
bottom: 20,
|
|
14
|
+
left: 20,
|
|
15
|
+
position: 'fixed',
|
|
16
|
+
width: '310px',
|
|
17
|
+
height: 'auto',
|
|
18
|
+
margin: 0,
|
|
19
|
+
padding: 0,
|
|
20
|
+
listStyleType: 'none',
|
|
21
|
+
zIndex: 10000000
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
if (window.innerWidth < 600) {
|
|
25
|
+
$(this).css({
|
|
26
|
+
left: 5
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
parent: {
|
|
32
|
+
object: '<li />',
|
|
33
|
+
selector: 'li',
|
|
34
|
+
css: {}
|
|
35
|
+
},
|
|
36
|
+
css: {
|
|
37
|
+
display: 'none',
|
|
38
|
+
width: '310px'
|
|
39
|
+
},
|
|
40
|
+
addClass: ''
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
})(jQuery);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.bottomRight = {
|
|
4
|
+
name: 'bottomRight',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_bottomRight_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_bottomRight_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
bottom: 20,
|
|
14
|
+
right: 20,
|
|
15
|
+
position: 'fixed',
|
|
16
|
+
width: '310px',
|
|
17
|
+
height: 'auto',
|
|
18
|
+
margin: 0,
|
|
19
|
+
padding: 0,
|
|
20
|
+
listStyleType: 'none',
|
|
21
|
+
zIndex: 10000000
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
if (window.innerWidth < 600) {
|
|
25
|
+
$(this).css({
|
|
26
|
+
right: 5
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
parent: {
|
|
32
|
+
object: '<li />',
|
|
33
|
+
selector: 'li',
|
|
34
|
+
css: {}
|
|
35
|
+
},
|
|
36
|
+
css: {
|
|
37
|
+
display: 'none',
|
|
38
|
+
width: '310px'
|
|
39
|
+
},
|
|
40
|
+
addClass: ''
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
})(jQuery);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.center = {
|
|
4
|
+
name: 'center',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_center_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_center_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
position: 'fixed',
|
|
14
|
+
width: '310px',
|
|
15
|
+
height: 'auto',
|
|
16
|
+
margin: 0,
|
|
17
|
+
padding: 0,
|
|
18
|
+
listStyleType: 'none',
|
|
19
|
+
zIndex: 10000000
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// getting hidden height
|
|
23
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
|
24
|
+
$("body").append(dupe);
|
|
25
|
+
dupe.find('.i-am-closing-now').remove();
|
|
26
|
+
dupe.find('li').css('display', 'block');
|
|
27
|
+
var actual_height = dupe.height();
|
|
28
|
+
dupe.remove();
|
|
29
|
+
|
|
30
|
+
if ($(this).hasClass('i-am-new')) {
|
|
31
|
+
$(this).css({
|
|
32
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
|
|
33
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
$(this).animate({
|
|
37
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
|
|
38
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
|
39
|
+
}, 500);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
parent: {
|
|
45
|
+
object: '<li />',
|
|
46
|
+
selector: 'li',
|
|
47
|
+
css: {}
|
|
48
|
+
},
|
|
49
|
+
css: {
|
|
50
|
+
display: 'none',
|
|
51
|
+
width: '310px'
|
|
52
|
+
},
|
|
53
|
+
addClass: ''
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
})(jQuery);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.centerLeft = {
|
|
4
|
+
name: 'centerLeft',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_centerLeft_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_centerLeft_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
left: 20,
|
|
14
|
+
position: 'fixed',
|
|
15
|
+
width: '310px',
|
|
16
|
+
height: 'auto',
|
|
17
|
+
margin: 0,
|
|
18
|
+
padding: 0,
|
|
19
|
+
listStyleType: 'none',
|
|
20
|
+
zIndex: 10000000
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// getting hidden height
|
|
24
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
|
25
|
+
$("body").append(dupe);
|
|
26
|
+
dupe.find('.i-am-closing-now').remove();
|
|
27
|
+
dupe.find('li').css('display', 'block');
|
|
28
|
+
var actual_height = dupe.height();
|
|
29
|
+
dupe.remove();
|
|
30
|
+
|
|
31
|
+
if ($(this).hasClass('i-am-new')) {
|
|
32
|
+
$(this).css({
|
|
33
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
$(this).animate({
|
|
37
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
|
38
|
+
}, 500);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (window.innerWidth < 600) {
|
|
42
|
+
$(this).css({
|
|
43
|
+
left: 5
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
parent: {
|
|
50
|
+
object: '<li />',
|
|
51
|
+
selector: 'li',
|
|
52
|
+
css: {}
|
|
53
|
+
},
|
|
54
|
+
css: {
|
|
55
|
+
display: 'none',
|
|
56
|
+
width: '310px'
|
|
57
|
+
},
|
|
58
|
+
addClass: ''
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
})(jQuery);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.centerRight = {
|
|
4
|
+
name: 'centerRight',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_centerRight_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_centerRight_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
right: 20,
|
|
14
|
+
position: 'fixed',
|
|
15
|
+
width: '310px',
|
|
16
|
+
height: 'auto',
|
|
17
|
+
margin: 0,
|
|
18
|
+
padding: 0,
|
|
19
|
+
listStyleType: 'none',
|
|
20
|
+
zIndex: 10000000
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// getting hidden height
|
|
24
|
+
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
|
25
|
+
$("body").append(dupe);
|
|
26
|
+
dupe.find('.i-am-closing-now').remove();
|
|
27
|
+
dupe.find('li').css('display', 'block');
|
|
28
|
+
var actual_height = dupe.height();
|
|
29
|
+
dupe.remove();
|
|
30
|
+
|
|
31
|
+
if ($(this).hasClass('i-am-new')) {
|
|
32
|
+
$(this).css({
|
|
33
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
$(this).animate({
|
|
37
|
+
top: ($(window).height() - actual_height) / 2 + 'px'
|
|
38
|
+
}, 500);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (window.innerWidth < 600) {
|
|
42
|
+
$(this).css({
|
|
43
|
+
right: 5
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
parent: {
|
|
50
|
+
object: '<li />',
|
|
51
|
+
selector: 'li',
|
|
52
|
+
css: {}
|
|
53
|
+
},
|
|
54
|
+
css: {
|
|
55
|
+
display: 'none',
|
|
56
|
+
width: '310px'
|
|
57
|
+
},
|
|
58
|
+
addClass: ''
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
})(jQuery);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.inline = {
|
|
4
|
+
name: 'inline',
|
|
5
|
+
options: {},
|
|
6
|
+
container: {
|
|
7
|
+
object: '<ul class="noty_inline_layout_container" />',
|
|
8
|
+
selector: 'ul.noty_inline_layout_container',
|
|
9
|
+
style: function() {
|
|
10
|
+
$(this).css({
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: 'auto',
|
|
13
|
+
margin: 0,
|
|
14
|
+
padding: 0,
|
|
15
|
+
listStyleType: 'none',
|
|
16
|
+
zIndex: 9999999
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
parent: {
|
|
21
|
+
object: '<li />',
|
|
22
|
+
selector: 'li',
|
|
23
|
+
css: {}
|
|
24
|
+
},
|
|
25
|
+
css: {
|
|
26
|
+
display: 'none'
|
|
27
|
+
},
|
|
28
|
+
addClass: ''
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
})(jQuery);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.top = {
|
|
4
|
+
name: 'top',
|
|
5
|
+
options: {},
|
|
6
|
+
container: {
|
|
7
|
+
object: '<ul id="noty_top_layout_container" />',
|
|
8
|
+
selector: 'ul#noty_top_layout_container',
|
|
9
|
+
style: function() {
|
|
10
|
+
$(this).css({
|
|
11
|
+
top: 0,
|
|
12
|
+
left: '5%',
|
|
13
|
+
position: 'fixed',
|
|
14
|
+
width: '90%',
|
|
15
|
+
height: 'auto',
|
|
16
|
+
margin: 0,
|
|
17
|
+
padding: 0,
|
|
18
|
+
listStyleType: 'none',
|
|
19
|
+
zIndex: 9999999
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
parent: {
|
|
24
|
+
object: '<li />',
|
|
25
|
+
selector: 'li',
|
|
26
|
+
css: {}
|
|
27
|
+
},
|
|
28
|
+
css: {
|
|
29
|
+
display: 'none'
|
|
30
|
+
},
|
|
31
|
+
addClass: ''
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
})(jQuery);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
|
|
3
|
+
$.noty.layouts.topCenter = {
|
|
4
|
+
name: 'topCenter',
|
|
5
|
+
options: { // overrides options
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
object: '<ul id="noty_topCenter_layout_container" />',
|
|
10
|
+
selector: 'ul#noty_topCenter_layout_container',
|
|
11
|
+
style: function() {
|
|
12
|
+
$(this).css({
|
|
13
|
+
top: 20,
|
|
14
|
+
left: 0,
|
|
15
|
+
position: 'fixed',
|
|
16
|
+
width: '310px',
|
|
17
|
+
height: 'auto',
|
|
18
|
+
margin: 0,
|
|
19
|
+
padding: 0,
|
|
20
|
+
listStyleType: 'none',
|
|
21
|
+
zIndex: 10000000
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
$(this).css({
|
|
25
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
parent: {
|
|
30
|
+
object: '<li />',
|
|
31
|
+
selector: 'li',
|
|
32
|
+
css: {}
|
|
33
|
+
},
|
|
34
|
+
css: {
|
|
35
|
+
display: 'none',
|
|
36
|
+
width: '310px'
|
|
37
|
+
},
|
|
38
|
+
addClass: ''
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
})(jQuery);
|