hoverboard 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.
data/dev/dev.rb ADDED
@@ -0,0 +1,38 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ Bundler.setup
4
+
5
+ require 'sinatra'
6
+ require 'haml'
7
+
8
+ require 'pathname'
9
+ require 'pp'
10
+
11
+ # pull in hoverboard proper
12
+ root = Pathname( Sinatra::Application.root ).parent
13
+ $LOAD_PATH << root+'lib'
14
+ require 'hoverboard'
15
+
16
+ class Object
17
+ def tapp(tag=nil)
18
+ print "#{tag}=" if tag
19
+ pp self
20
+ self
21
+ end
22
+ end
23
+
24
+ load Hoverboard.gem_root+'pivotal_config.dont_commit.rb'
25
+
26
+ use Hoverboard::RackApp
27
+
28
+ helpers do
29
+ include Hoverboard::Helpers
30
+ end
31
+
32
+ before do
33
+ Hoverboard::Assets.rebuild!
34
+ end
35
+
36
+ get '/' do
37
+ haml :index
38
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/dev/images/pt.png ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,123 @@
1
+ (function($) {
2
+ $(function() {
3
+ var bar, popOver, tab, stories, spinner;
4
+
5
+ $("body").prepend("<div id='uat-bar'><a class='wua-go' href='#'>Show me what to test</a><div class='wua-pop-over'></div></div>");
6
+
7
+ spinner = $('<img src="{{spinner_uri}}">');
8
+
9
+ bar = $('#uat-bar');
10
+ popOver = $(".wua-pop-over" ,bar);
11
+ tab = $("a.wua-go" ,bar);
12
+
13
+ tab.toggle(
14
+ function() {
15
+ if (popOver.find("ol").length > 0) {
16
+ slideOut();
17
+ } else {
18
+ var goSpinner = spinner.clone()
19
+ .addClass('wua-go-spinner')
20
+ .insertAfter(tab)
21
+ .fadeIn();
22
+
23
+ $.ajax({
24
+ url: '/hoverboard',
25
+ success: function(response) {
26
+ goSpinner.fadeOut(function() {goSpinner.remove()});
27
+ popOver.append(response);
28
+ stories = popOver.find("ol");
29
+ slideOut();
30
+ }
31
+ });
32
+ }
33
+ },
34
+ function() {
35
+ slideIn();
36
+ }
37
+ );
38
+
39
+ function slideOut() {
40
+ popOver.animate({width: '400px'}, 500, function() {
41
+ stories.fadeIn(100);
42
+ });
43
+ tab.animate({left: '400px'}, 510);
44
+ }
45
+
46
+ function slideIn() {
47
+ stories.fadeOut(100, function() {
48
+ tab.animate({left: '0px'}, 490);
49
+ popOver.animate({width: '0px'}, 510);
50
+ });
51
+ }
52
+
53
+
54
+ $("a.wua-accept", bar).live("click", function() {
55
+ var acceptLink, storyName, storyId, storySpinner, listItem;
56
+
57
+ acceptLink = $(this);
58
+
59
+ storyId = acceptLink.siblings(".wua-story-id").html();
60
+ storyName = acceptLink.siblings("span.wua-story");
61
+ listItem = acceptLink.parent();
62
+
63
+ storySpinner = spinner.clone().insertBefore(storyName).fadeIn();
64
+
65
+ $.ajax({
66
+ method: "POST",
67
+ url: '/hoverboard/' + storyId + '/accept',
68
+ success: function(response) {
69
+ listItem.removeClass("wua-rejected").addClass("wua-accepted");
70
+ storySpinner.fadeOut(function() {storySpinner.remove()});
71
+ }
72
+ });
73
+
74
+ return false;
75
+ });
76
+
77
+ $("a.wua-reject", bar).live("click",
78
+ function() {
79
+ var rejectLink, reasonForm;
80
+
81
+ rejectLink = $(this);
82
+
83
+ reasonForm = rejectLink.siblings("form");
84
+
85
+ if (reasonForm.is(':visible')) {
86
+ reasonForm.slideUp();
87
+ } else {
88
+ reasonForm.slideDown();
89
+ }
90
+
91
+ return false;
92
+ }
93
+ );
94
+
95
+ $("button.wua-reject", bar).live("click", function() {
96
+ var button, reasonForm, storyName, storyId, spinner, listItem;
97
+
98
+ button = $(this);
99
+
100
+ reasonForm = button.parent();
101
+ storyId = reasonForm.siblings(".wua-story-id").html();
102
+ storyName = reasonForm.siblings("span.wua-story");
103
+ spinner = reasonForm.siblings(".wua-spinner");
104
+ listItem = reasonForm.parent();
105
+
106
+ spinner.fadeIn();
107
+
108
+ $.ajax({
109
+ method: "POST",
110
+ url: '/hoverboard/' + storyId + '/reject',
111
+ data: {reason: $(".wua-reason").val()},
112
+ success: function(response) {
113
+ listItem.removeClass("wua-accepted").addClass("wua-rejected");
114
+ reasonForm.slideUp();
115
+ spinner.fadeOut();
116
+ }
117
+ });
118
+
119
+ return false;
120
+ });
121
+
122
+ });
123
+ })(jQuery);
@@ -0,0 +1,166 @@
1
+ #uat-bar {
2
+ width: auto;
3
+ font-size: .9em;
4
+ text-align: center;
5
+ position: absolute;
6
+ top: 30%;
7
+ left: 0;
8
+ padding: 0;
9
+ z-index: 2147483647;
10
+ font-family: Helvetica, Arial, sans-serif;
11
+ }
12
+
13
+ #uat-bar a:link, #uat-bar a:visited {
14
+ color: #efefef;
15
+ text-decoration: none;
16
+ }
17
+
18
+ #uat-bar a:active, #uat-bar a:hover, #uat-bar a:focus {
19
+ color: #fff;
20
+ text-decoration: underline;
21
+ }
22
+
23
+ #uat-bar a.wua-go {
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ font-weight: bold;
28
+ padding: .5em;
29
+ display: block;
30
+ width: 40px;
31
+ height: 125px;
32
+ font-size: 0.001em;
33
+ text-indent: -2000em;
34
+ background: #212121 url({{logo_uri}}) no-repeat -4px -10px;
35
+ -moz-border-radius-bottomright: 10px;
36
+ -webkit-border-bottom-right-radius: 10px;
37
+ -moz-border-radius-topright: 10px;
38
+ -webkit-border-top-right-radius: 10px
39
+ }
40
+
41
+ #uat-bar a.wua-go:hover {
42
+ background-position: -2px -10px;
43
+ }
44
+
45
+ #uat-bar .wua-pop-over {
46
+ min-height: 450px;
47
+ width: 0;
48
+ clear: right;
49
+ background: #212121;
50
+ color: #efefef;
51
+ text-align: left;
52
+ padding: 0 0 .75em 0;
53
+ -moz-border-radius-bottomright: 10px;
54
+ -webkit-border-bottom-right-radius: 10px;
55
+ }
56
+
57
+ #uat-bar .wua-pop-over ol {
58
+ height: 450px;
59
+ overflow: auto;
60
+ list-style: none;
61
+ margin: 0 0 0;
62
+ padding: 5px 10px
63
+ }
64
+
65
+ #uat-bar .wua-pop-over li {
66
+ padding: .9em .75em .75em 95px;
67
+ margin-bottom: 5px;
68
+ position: relative;
69
+ }
70
+
71
+ #uat-bar .wua-pop-over li.wua-header {font-size: 18px;font-weight:normal;border-bottom: 1px solid #2c2c2c;margin-bottom: 1em;padding-left: 0;}
72
+
73
+ #uat-bar .wua-pop-over li.wua-rejected {
74
+ background: #a82a30;
75
+ }
76
+
77
+ #uat-bar .wua-pop-over li.wua-accepted {
78
+ background: #9ec74e;
79
+ }
80
+
81
+ #uat-bar .wua-pop-over li:hover {
82
+ background-color: #323232;
83
+ cursor: pointer
84
+ }
85
+
86
+ #uat-bar .wua-pop-over li.wua-header:hover {background:transparent;}
87
+
88
+ #uat-bar .wua-hide {
89
+ display: none;
90
+ }
91
+
92
+ #uat-bar input {
93
+ clear: none;
94
+ }
95
+
96
+ #uat-bar .wua-pop-over li a.wua-accept {
97
+ position: absolute;
98
+ top: 0;
99
+ left: 0;
100
+ display:block;
101
+ width: 25px;
102
+ height: 28px;
103
+ background: url({{accept_uri}}) no-repeat 1px 5px;
104
+ font-size: 0.001em;
105
+ text-indent: -20000em;
106
+ }
107
+
108
+ #uat-bar .wua-pop-over li a.wua-accept:hover {
109
+ background-position: 1px -24px;
110
+ }
111
+
112
+ #uat-bar .wua-pop-over li a.wua-reject {
113
+ position: absolute;
114
+ top: 0;
115
+ left: 29px;
116
+ display:block;
117
+ width: 25px;
118
+ height: 30px;
119
+ background: url({{reject_uri}}) no-repeat 0 8px;
120
+ font-size: 0.001em;
121
+ text-indent: -20000em;
122
+ }
123
+
124
+ #uat-bar .wua-pop-over li a.wua-reject:hover {
125
+ background-position: 0 -24px;
126
+ }
127
+
128
+ #uat-bar .wua-pop-over li a.wua-pivotal {
129
+ position: absolute;
130
+ top: 0;
131
+ left: 60px;
132
+ display:block;
133
+ width: 25px;
134
+ height: 30px;
135
+ background: url({{pt_uri}}) no-repeat 0 10px;
136
+ font-size: 0.001em;
137
+ text-indent: -20000em;
138
+ }
139
+
140
+ #uat-bar .wua-pop-over li a.wua-pivotal:hover {
141
+ background-position: 0 -22px;
142
+ }
143
+
144
+
145
+ #uat-bar label {margin-top: 5px;padding-top:5px;display:block;font-weight:bold;border-top: 1px dashed #2c2c2c;}
146
+ #uat-bar textarea {width: 250px;height: 40px;margin-bottom: 5px;}
147
+ #uat-bar button.wua-reject {
148
+ display:block;
149
+ width: 60px;
150
+ height: 25px;
151
+ background: url({{btnreject_uri}}) no-repeat 0 0;
152
+ font-size: 0.001em;
153
+ text-indent: -20000em;
154
+ border:none;
155
+ cursor: pointer;
156
+ }
157
+
158
+
159
+ #uat-bar .wua-go-spinner {
160
+ display: block;
161
+ position: absolute;
162
+
163
+ left: 13px;
164
+ top: 54px;
165
+
166
+ }
@@ -0,0 +1,10 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title hoverboard dev
5
+ %script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js')
6
+ %body
7
+ bodily
8
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eget nisi eget turpis sodales interdum et vel sem. Suspendisse potenti. Nullam convallis lacinia leo at elementum. Quisque mi ante, egestas id accumsan ut, tempor vel erat. Cras placerat sapien non mi cursus egestas. Nulla at odio in ipsum fermentum posuere id sit amet nisi. Phasellus id mi dui, vitae posuere turpis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris bibendum, justo eget adipiscing imperdiet, neque dolor cursus velit, at tristique nunc erat venenatis dui. Integer ut diam velit, vitae tincidunt metus. Integer mattis adipiscing convallis. Aenean dapibus scelerisque nisi et semper. Ut luctus nisl a nulla porttitor a feugiat risus pulvinar. Nam ut quam ut ipsum faucibus auctor tempus ut diam. Donec facilisis, nunc faucibus faucibus congue, metus justo sagittis nibh, vitae mollis nisl eros quis orci. Ut tincidunt, nisl sed vulputate condimentum, sem lectus elementum tortor, eu pharetra enim massa id justo. Donec non libero eget ligula laoreet imperdiet sed sit amet diam.
9
+
10
+ = hoverboard
@@ -0,0 +1,107 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "hoverboard"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Ben Askins", "Lachie Cox", "Ben Webster", "Graham Siener"]
12
+ s.date = "2012-12-28"
13
+ s.description = "Adds a toolbar to your rails app that directs your clients to test stories that have been marked as 'delivered' in Pivotal Tracker "
14
+ s.email = "siener@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "README.md"
17
+ ]
18
+ s.files = [
19
+ ".document",
20
+ ".travis.yml",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "MIT.LICENSE",
24
+ "README.md",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "assets/hoverboard.css",
28
+ "assets/hoverboard.js",
29
+ "dev/dev.rb",
30
+ "dev/images/accept.png",
31
+ "dev/images/bg-uat.gif",
32
+ "dev/images/btnreject.png",
33
+ "dev/images/hoverboard-close.png",
34
+ "dev/images/hoverboard-open.png",
35
+ "dev/images/hoverboard.png",
36
+ "dev/images/pt.png",
37
+ "dev/images/reject.png",
38
+ "dev/images/spinner.gif",
39
+ "dev/images/uat-bg.png",
40
+ "dev/images/uat-logo.gif",
41
+ "dev/javascripts/hoverboard.js.mustache",
42
+ "dev/stylesheets/hoverboard.css.mustache",
43
+ "dev/views/index.haml",
44
+ "hoverboard.gemspec",
45
+ "lib/hoverboard.rb",
46
+ "lib/hoverboard/assets.rb",
47
+ "lib/hoverboard/assets/context.rb",
48
+ "lib/hoverboard/assets/image.rb",
49
+ "lib/hoverboard/configuration.rb",
50
+ "lib/hoverboard/helpers.rb",
51
+ "lib/hoverboard/rack_app.rb",
52
+ "lib/hoverboard/rails.rb",
53
+ "lib/hoverboard/railtie.rb",
54
+ "lib/hoverboard/tasks.rb",
55
+ "lib/hoverboard/templates/index.haml"
56
+ ]
57
+ s.homepage = "http://github.com/gsiener/hoverboard"
58
+ s.require_paths = ["lib"]
59
+ s.rubygems_version = "1.8.24"
60
+ s.summary = "Direct your clients to test delivered features"
61
+
62
+ if s.respond_to? :specification_version then
63
+ s.specification_version = 3
64
+
65
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
66
+ s.add_runtime_dependency(%q<rake>, [">= 0"])
67
+ s.add_runtime_dependency(%q<haml>, [">= 0"])
68
+ s.add_runtime_dependency(%q<mustache>, [">= 0"])
69
+ s.add_runtime_dependency(%q<sinatra>, [">= 0"])
70
+ s.add_runtime_dependency(%q<shotgun>, [">= 0"])
71
+ s.add_runtime_dependency(%q<thin>, [">= 0"])
72
+ s.add_runtime_dependency(%q<json>, [">= 0"])
73
+ s.add_runtime_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
74
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
75
+ s.add_runtime_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
76
+ s.add_runtime_dependency(%q<haml>, [">= 2.2.0"])
77
+ s.add_runtime_dependency(%q<rack>, [">= 1.0.0"])
78
+ else
79
+ s.add_dependency(%q<rake>, [">= 0"])
80
+ s.add_dependency(%q<haml>, [">= 0"])
81
+ s.add_dependency(%q<mustache>, [">= 0"])
82
+ s.add_dependency(%q<sinatra>, [">= 0"])
83
+ s.add_dependency(%q<shotgun>, [">= 0"])
84
+ s.add_dependency(%q<thin>, [">= 0"])
85
+ s.add_dependency(%q<json>, [">= 0"])
86
+ s.add_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
87
+ s.add_dependency(%q<jeweler>, [">= 0"])
88
+ s.add_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
89
+ s.add_dependency(%q<haml>, [">= 2.2.0"])
90
+ s.add_dependency(%q<rack>, [">= 1.0.0"])
91
+ end
92
+ else
93
+ s.add_dependency(%q<rake>, [">= 0"])
94
+ s.add_dependency(%q<haml>, [">= 0"])
95
+ s.add_dependency(%q<mustache>, [">= 0"])
96
+ s.add_dependency(%q<sinatra>, [">= 0"])
97
+ s.add_dependency(%q<shotgun>, [">= 0"])
98
+ s.add_dependency(%q<thin>, [">= 0"])
99
+ s.add_dependency(%q<json>, [">= 0"])
100
+ s.add_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
101
+ s.add_dependency(%q<jeweler>, [">= 0"])
102
+ s.add_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
103
+ s.add_dependency(%q<haml>, [">= 2.2.0"])
104
+ s.add_dependency(%q<rack>, [">= 1.0.0"])
105
+ end
106
+ end
107
+