whereuat 0.0.13 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+ pivotal_config.dont_commit.rb
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source :rubygems
2
+
3
+ gem 'haml'
4
+ gem 'mustache'
5
+
6
+ gem 'sinatra'
7
+ gem 'shotgun'
8
+ gem 'thin'
9
+
10
+ gem 'json'
11
+ gem 'pivotal-tracker', '>= 0.1.3'
@@ -0,0 +1,42 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ builder (2.1.2)
5
+ daemons (1.1.0)
6
+ eventmachine (0.12.10)
7
+ haml (3.0.16)
8
+ happymapper (0.3.2)
9
+ libxml-ruby (~> 1.1.3)
10
+ json (1.4.6)
11
+ libxml-ruby (1.1.4)
12
+ mime-types (1.16)
13
+ mustache (0.11.2)
14
+ nokogiri (1.4.3.1)
15
+ pivotal-tracker (0.2.0)
16
+ builder
17
+ happymapper (>= 0.2.4)
18
+ nokogiri (~> 1.4.1)
19
+ rest-client (~> 1.5.1)
20
+ rack (1.2.1)
21
+ rest-client (1.5.1)
22
+ mime-types (>= 1.16)
23
+ shotgun (0.8)
24
+ rack (>= 1.0)
25
+ sinatra (1.0)
26
+ rack (>= 1.0)
27
+ thin (1.2.7)
28
+ daemons (>= 1.0.9)
29
+ eventmachine (>= 0.12.6)
30
+ rack (>= 1.0.0)
31
+
32
+ PLATFORMS
33
+ ruby
34
+
35
+ DEPENDENCIES
36
+ haml
37
+ json
38
+ mustache
39
+ pivotal-tracker (>= 0.1.3)
40
+ shotgun
41
+ sinatra
42
+ thin
data/README.md CHANGED
@@ -29,24 +29,6 @@ The helper will insert a smidgeon of javascript that will add a tiny tab on the
29
29
 
30
30
  Reload a page from your app and give it a whirl.
31
31
 
32
- ### Installing assets
33
-
34
- By default, whereuat's assets are served as raw blobs from Github. Sometimes you'd rather serve them from within your app.
35
-
36
- In Rails 3, after whereuat configuration above, its as simple as
37
-
38
- rake whereuat:install
39
-
40
- In Rails 2, you need to create a `RAILS_ROOT/lib/tasks/whereuat.rake`
41
- require 'whereuat/tasks'
42
-
43
- then
44
- rake whereuat:install
45
-
46
- (You can always copy the assets in the gem over by hand)
47
-
48
- **Please note** image assets are served from PLUS2's server at `conversant.com.au`. Configurable image urls are coming in a later version but for now please edit the paths manually.
49
-
50
32
  ## Note on Patches/Pull Requests
51
33
 
52
34
  * Fork the project.
@@ -56,6 +38,16 @@ then
56
38
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
57
39
  * Send me a pull request. Bonus points for topic branches.
58
40
 
41
+ ### rake dev
42
+
43
+ If you'd like to contribute to `whereuat` you can get started by running
44
+
45
+ rake dev
46
+
47
+ This sets up the correct configuration and environment (follow the instructions), then starts a sinatra app under shotgun. You can use this sinatra app to verify your work on `whereuat`.
48
+
49
+ All assets are regenerated from their constituents on each request. The constituents are located in the `dev` directory.
50
+
59
51
  ## Contributors
60
52
 
61
53
  * Ben Askins
data/Rakefile CHANGED
@@ -20,3 +20,63 @@ rescue LoadError
20
20
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
21
  end
22
22
 
23
+
24
+ rake_app = Rake::Application.new
25
+ rake_app.collect_tasks
26
+ if rake_app.top_level_tasks.include?('dev')
27
+ require 'pathname'
28
+
29
+ sh "bundle check || bundle install"
30
+
31
+ task :dev => %w{dev:run}
32
+
33
+ namespace :dev do
34
+ task :run => :setup do
35
+ sh 'bundle exec shotgun --server thin dev/dev.rb'
36
+ end
37
+
38
+ task :setup do
39
+ gem_root = Pathname('..').expand_path(__FILE__)
40
+ pivotal_config = gem_root+'pivotal_config.dont_commit.rb'
41
+ unless pivotal_config.exist?
42
+ puts "What's your pivotal tracker token? (find your down the bottom of https://www.pivotaltracker.com/profile)."
43
+ token = $stdin.gets.chomp
44
+
45
+ puts "What pivotal tracker project do you want to test against? (e.g. The digits at the end of http://www.pivotaltracker.com/projects/12345)."
46
+ project_id = $stdin.gets.chomp
47
+
48
+ puts "Creating config using your details."
49
+
50
+ pivotal_config.open('w') {|f|
51
+ f << %{Whereuat.configure do |config|
52
+ config.pivotal_tracker_token = "#{token}"
53
+ config.pivotal_tracker_project = #{project_id}
54
+ end
55
+ }.gsub(/^\s{3,16}/,'')
56
+ }
57
+ end
58
+ end
59
+ end
60
+
61
+ else
62
+ desc "set up and run app in a convenient dev-only way. rake dev *must* be called as the only top level task (i.e. as 'rake dev')"
63
+ task :dev do
64
+ abort "Please run rake dev as 'rake dev'"
65
+ end
66
+ end
67
+
68
+ task :bundled_env do
69
+ require 'rubygems'
70
+ require 'bundler'
71
+ Bundler.setup
72
+
73
+ $LOAD_PATH << File.expand_path('../lib',__FILE__)
74
+ require 'whereuat'
75
+ end
76
+
77
+ namespace :assets do
78
+ desc "Rebuild assets for distribution"
79
+ task :rebuild => :bundled_env do
80
+ Whereuat::Assets.rebuild!
81
+ end
82
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.13
1
+ 0.1.0
@@ -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(data:image/gif;base64,R0lGODlhPgCAAPf/A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uoEBfwdM4AEjwRzMXUgs8JGLBjv4wQ7mwWpDcgt8IAEJylCAhhWQiQvjQQFawAcrEpyQW4QAw1lAhApUgIgsaAEJ96CGCqjRBxIj5BbXUEYm3NEHOfWBGwpQBhig4N3foiQWXwPb9TiT5OvZGCH/KXItA2Rknlj5ylgWSEAAADs=) 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(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAA1CAYAAAHUouBxAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABwBJREFUeNpi/P//PwMMMIGI+Sf8/zMyMkI4IGDiJJHAAFImKCgoBlcGBK+AAgwsUA4bEP8Dy4SWC5gBqT8AAcSIbDRIswrjvON+YCFGII8ZSAuDNPwFGcXgnSSjdeTG3M+MmX1K7v/+/ucACCAGmHYjR1Hn0CJZXxAbbBvMFBDYM/+LBNjWT1/efUHYxsAGtl1ISIgBGTAxoIHcWaIXYH4Tv/Rw6zcgrQ7yFqrjoQAggLAKwgGys8AWFc9WXo7sLKb0LsV2bR3tCD4eIZ6+nZYfwYJMzIxKMBV8vMK8YMEVLe/7YYLvPrwEq2SEBqMgkGIF4h/v37//xAjhM+D3Jjzo0BSxMMW1CvXJqLPyuKfwqQqIM7sDBX8xAWP/v4gsS4aaGfs+jxQ+WbD2T2/+3jX24Dr58v7v428e/+XFGSAAAcSALqhjLSCZ1ikfideZQH8w+mWJ7rSw01/mFi0djxHuwLhkyZsl+kBeRkMaPWhao25JAEPjB9jEiBrBpciKQEBIQJwfhJN7hNcgrP7L8h1bSP358+vPp+fs55Ct5gSyfYp7nEoYWL+B2Az/gODXV5anU2uOhQCt/s6AN20QnYjQIww9BeNUCPRZ2o3jPz78+4cI1w8v/16ubsk+GuPU6wzkXgBL/P75XwOI+cpLqmcrG7L/LC2unCWvzZa+59T8dKD0WVC4gBWCUsGpLd+WB1hXSV8/9kOzOLspbsfsT/XfPv4TRI8ZASBbCoiRfQZKr4+B+DOIAxBARPsaJUEUz1Ful1XjksCXuBn5hdkTM3tULwM1MGFVJKvDqCUmLAsLSHYMRdLKXNLx1WpH2VjZWW+c+XAIKPQT2RcMmX2Kh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zABmZPz/89u/6QeWfdnmFMtbo6PkmHH89J6FCyreTUTuLHEBa4aGd8/+PN848eMOUFcAm2HAKk/SIoB7ooN2psqWw1OPLKp51woUvgvEoFLjD7xHCOzFMbNyMDJmTxNZYKWRoHH0xoJDb578yVzV9uGpby6/lJwm62p3g1Ld3Zd73tVXdpc8u/37AKhtgmwxSkkLrDb/Ts16k33EeaqdTQh3TlboxFv2Vtu/G8mHcX/68fLvin01l+aXvy1P7BDy/fOb4ffi2nePcRbbbByMoIrixsW9328C8e7j7pleVoHc2bJChmxLtrTvBLqyDtTFADWogWEHCldm3HUAI1gSlIpB3b2r53Z+ewjE27bp1yreu/jrMlDsKRBz4UoFyN0MycAi/hBgla3CxMLwB1dS+PubgfXprd+nds75tAPaaviFbhgD1Mns0GodX4n7D2rAT1ibAAYAHCnJTzS4+XkAAAAASUVORK5CYII=) 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(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAA1CAYAAAHUouBxAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACH1JREFUeNpi/P//PwMcgDjH3bz/WwsKBzOBBN5//fL33I9vGxlBMlxcXCDBfwzIelhAxGR5lQe//v9/DtZT9+mtCSsjowhAADHClLGccPcBsxg5OTk1gLQYiMGACrRERKVWGph+ZxQUFOQG8k0AAgisfbuV/TchPj6wYsdDe3nAtvFwcXH++vMHplMN5jgGWVY2H2kWVpYT379uYETxGLJje+VVNj9iZlws8eef61+G/7fBKoWEhFhnyip9fvHx48vt37+WwwT5gRpYoTrfAgQQdjN9RcXFa4zNXoA4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/MG3ctu68dYoFTHTQbV5dhtCkMfKgukqeP7FbCuhAnLj98iVV9dMVQz93wypgmWTjdvEeBO63vXKiR3H8kpEsj/UrXXDdjqO61vJCy94FfkMRWQ6LHCe8V1XlllnYA4F2kVtTcRTLz69h+ZEDydGgfBQCDTOrGVZYKsn7Kv3+uUA/wsdsVrlk5K/VckLN2GBozLxQaEdjLrc+6dgt+/PZe5CNI1AUljrHO4Ah03ix6YVtPUkhhO+A41ZI8sbXTrGr0yycJm1UECbVL5fktQ+K5vX7ltGO2XUyJ079AAcXh1uOFyy6KhxZV+24i9LI2QtXjDtlNDMdUW5GR+hZjGHroZFLqQhlRYqutXwI+IxSQN632lD+O7X0Oty5esHwcssJO9AEBjLBDz4UidhFAg2DDDwv039LgvfPNpvoopFNA+oAAAAASUVORK5CYII=) 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(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAxCAYAAAFPM6JnAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABWpJREFUeNpi/P//PwMMMH//88dNJTj7Tsq5QyfAIpcvXfoLohmRlTExIAGwHlcnpzvBYWGoegACCK6H5YSQ+n8GRkYGlhQJFrs3b98ww6XgRmGqAQggiFlFtf93c8r9v9sxCaJBXU2NdQ+3/P+LAur/d7JKggQZURyH1ZEogCgzAQIIu5mTZ0yv3soo8n8ro+j/3Pz8fLDoIVO3/zf51f/fEND4f8wt9D9Y54cr1/+fBpoHwp8fPYEIMjExMWw/fOjeut0774F0ggSJdzwJgjjd+ePKjcMgTLo7AQIIHKPMzMwMre3tDi/f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xvRE1MOJ4devHwy/gYp/ASV+AN3zC+gaUDD/BOP/ED7Qsp+/fzCI+nsyPPr86c32TZsuwAMfRGhra9uu27lj8//VW/lvF9UxcHBwMLBzcgJdCVIASX1/gJZ8//YVlOoYdOZMYHhvpvvBx8k54MXz5weRSxhgToGUjQnJyYVnrl97+/rGrf9XW/r+n/CP/X/UIfD/yYD4/zd6pv1/c/f+/2MXL7y3d7AvB7XjoPrgsQlPcAyIYpSBl5ubiY2dQ4lHgF+RhY2N98+vn19ZGJnuAV1xH5h0/iD7CjmdEV0zU72uHTVskBs2QsozBlB59vDF88cXU4uAjS5RsCGgZt39gITL4Fbbv38fQfT9gMTLoGbeYUE1oDrh/zcbuv5fuXf3iaKSkgLMMJzlmcK6eXLs2uo2wGKAD0QrrJsrR3Z5dj8o6dHPqzePAK38BKLvByU/GrrlGQDr9ThSDN5z3wAAAABJRU5ErkJggg==) 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(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAWCAYAAAHrzM+0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABvZJREFUeNpi/P//PwM+wDRVQdXl379//096+P5/PG8hmAbhj+cvgGnGKfIqLooyMrthOrikJBm+PXsONwEggBjxWcECMkJv3UqGXzdvMTxftZbh6+07DGJeHgzPVq1hYHn75QsDEzMzw9HcQriOl/MWgGmAAALba6GtvZuBDMAEIr78+MGgOGc6g/baFQwfv39nUGquZxAM8GPQBor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HB4aGhQGAkn4RHpWau8290fAfjFojmSKYJGAAAAABJRU5ErkJggg==) 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,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="data:image/gif;base64,R0lGODlhEAAQAPQAACEhIf///yYmJs3NzYuLi/j4+Nzc3ENDQ2tra+rq6peXl6WlpTc3N3l5eVFRUb+/v7OzswAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFUCAgjmRpnqUwFGwhKoRgqq2YFMaRGjWA8AbZiIBbjQQ8AmmFUJEQhQGJhaKOrCksgEla+KIkYvC6SJKQOISoNSYdeIk1ayA8ExTyeR3F749CACH5BAkKAAAALAAAAAAQABAAAAVoICCKR9KMaCoaxeCoqEAkRX3AwMHWxQIIjJSAZWgUEgzBwCBAEQpMwIDwY1FHgwJCtOW2UDWYIDyqNVVkUbYr6CK+o2eUMKgWrqKhj0FrEM8jQQALPFA3MAc8CQSAMA5ZBjgqDQmHIyEAIfkECQoAAAAsAAAAABAAEAAABWAgII4j85Ao2hRIKgrEUBQJLaSHMe8zgQo6Q8sxS7RIhILhBkgumCTZsXkACBC+0cwF2GoLLoFXREDcDlkAojBICRaFLDCOQtQKjmsQSubtDFU/NXcDBHwkaw1cKQ8MiyEAIfkECQoAAAAsAAAAABAAEAAABVIgII5kaZ6AIJQCMRTFQKiDQx4GrBfGa4uCnAEhQuRgPwCBtwK+kCNFgjh6QlFYgGO7baJ2CxIioSDpwqNggWCGDVVGphly3BkOpXDrKfNm/4AhACH5BAkKAAAALAAAAAAQABAAAAVgICCOZGmeqEAMRTEQwskYbV0Yx7kYSIzQhtgoBxCKBDQCIOcoLBimRiFhSABYU5gIgW01pLUBYkRItAYAqrlhYiwKjiWAcDMWY8QjsCf4DewiBzQ2N1AmKlgvgCiMjSQhACH5BAkKAAAALAAAAAAQABAAAAVfICCOZGmeqEgUxUAIpkA0AMKyxkEiSZEIsJqhYAg+boUFSTAkiBiNHks3sg1ILAfBiS10gyqCg0UaFBCkwy3RYKiIYMAC+RAxiQgYsJdAjw5DN2gILzEEZgVcKYuMJiEAOwAAAAAAAAAAAA==">');
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: '/whereuat',
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: '/whereuat/' + 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: '/whereuat/' + 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,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 whereuat proper
12
+ root = Pathname( Sinatra::Application.root ).parent
13
+ $LOAD_PATH << root+'lib'
14
+ require 'whereuat'
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 Whereuat.gem_root+'pivotal_config.dont_commit.rb'
25
+
26
+ use Whereuat::RackApp
27
+
28
+ helpers do
29
+ include Whereuat::Helpers
30
+ end
31
+
32
+ before do
33
+ Whereuat::Assets.rebuild!
34
+ end
35
+
36
+ get '/' do
37
+ haml :index
38
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,21 +1,29 @@
1
1
  (function($) {
2
2
  $(function() {
3
- var popOver, tab, stories;
3
+ var bar, popOver, tab, stories, spinner;
4
4
 
5
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
- $("head").prepend("<link href='"+window.whereuat_stylesheet_url+"' media='screen' rel='stylesheet' type='text/css'>");
7
6
 
8
- popOver = $("#uat-bar .wua-pop-over");
9
- tab = $("#uat-bar a.wua-go");
7
+ spinner = $('<img src="{{spinner_uri}}">');
8
+
9
+ bar = $('#uat-bar');
10
+ popOver = $(".wua-pop-over" ,bar);
11
+ tab = $("a.wua-go" ,bar);
10
12
 
11
13
  tab.toggle(
12
14
  function() {
13
15
  if (popOver.find("ol").length > 0) {
14
16
  slideOut();
15
17
  } else {
18
+ var goSpinner = spinner.clone()
19
+ .addClass('wua-go-spinner')
20
+ .insertAfter(tab)
21
+ .fadeIn();
22
+
16
23
  $.ajax({
17
24
  url: '/whereuat',
18
25
  success: function(response) {
26
+ goSpinner.fadeOut(function() {goSpinner.remove()});
19
27
  popOver.append(response);
20
28
  stories = popOver.find("ol");
21
29
  slideOut();
@@ -42,31 +50,31 @@
42
50
  });
43
51
  }
44
52
 
45
- $("#uat-bar a.wua-accept").live("click", function() {
46
- var acceptLink, storyName, storyId, spinner, listItem;
53
+
54
+ $("a.wua-accept", bar).live("click", function() {
55
+ var acceptLink, storyName, storyId, storySpinner, listItem;
47
56
 
48
57
  acceptLink = $(this);
49
58
 
50
59
  storyId = acceptLink.siblings(".wua-story-id").html();
51
60
  storyName = acceptLink.siblings("span.wua-story");
52
- spinner = acceptLink.siblings(".wua-spinner");
53
61
  listItem = acceptLink.parent();
54
62
 
55
- spinner.fadeIn();
63
+ storySpinner = spinner.clone().insertBefore(storyName).fadeIn();
56
64
 
57
65
  $.ajax({
58
66
  method: "POST",
59
67
  url: '/whereuat/' + storyId + '/accept',
60
68
  success: function(response) {
61
69
  listItem.removeClass("wua-rejected").addClass("wua-accepted");
62
- spinner.fadeOut();
70
+ storySpinner.fadeOut(function() {storySpinner.remove()});
63
71
  }
64
72
  });
65
73
 
66
74
  return false;
67
75
  });
68
76
 
69
- $("#uat-bar a.wua-reject").live("click",
77
+ $("a.wua-reject", bar).live("click",
70
78
  function() {
71
79
  var rejectLink, reasonForm;
72
80
 
@@ -84,7 +92,7 @@
84
92
  }
85
93
  );
86
94
 
87
- $("#uat-bar button.wua-reject").live("click", function() {
95
+ $("button.wua-reject", bar).live("click", function() {
88
96
  var button, reasonForm, storyName, storyId, spinner, listItem;
89
97
 
90
98
  button = $(this);
@@ -1,5 +1,6 @@
1
1
  #uat-bar {
2
2
  width: auto;
3
+ font-size: .9em;
3
4
  text-align: center;
4
5
  position: absolute;
5
6
  top: 30%;
@@ -26,11 +27,11 @@
26
27
  font-weight: bold;
27
28
  padding: .5em;
28
29
  display: block;
29
- width: 42px;
30
+ width: 40px;
30
31
  height: 125px;
31
32
  font-size: 0.001em;
32
33
  text-indent: -2000em;
33
- background: #212121 url(http://conversant.com.au/whereuat/uat-bg.png) no-repeat -4px -10px;
34
+ background: #212121 url({{logo_uri}}) no-repeat -4px -10px;
34
35
  -moz-border-radius-bottomright: 10px;
35
36
  -webkit-border-bottom-right-radius: 10px;
36
37
  -moz-border-radius-topright: 10px;
@@ -99,13 +100,13 @@
99
100
  display:block;
100
101
  width: 25px;
101
102
  height: 28px;
102
- background: url(http://conversant.com.au/whereuat/uat-bg.png) no-repeat -9px -204px;
103
+ background: url({{accept_uri}}) no-repeat 1px 5px;
103
104
  font-size: 0.001em;
104
105
  text-indent: -20000em;
105
106
  }
106
107
 
107
108
  #uat-bar .wua-pop-over li a.wua-accept:hover {
108
- background-position: -9px -234px;
109
+ background-position: 1px -24px;
109
110
  }
110
111
 
111
112
  #uat-bar .wua-pop-over li a.wua-reject {
@@ -115,13 +116,13 @@
115
116
  display:block;
116
117
  width: 25px;
117
118
  height: 30px;
118
- background: url(http://conversant.com.au/whereuat/uat-bg.png) no-repeat -9px -136px;
119
+ background: url({{reject_uri}}) no-repeat 0 8px;
119
120
  font-size: 0.001em;
120
121
  text-indent: -20000em;
121
122
  }
122
123
 
123
124
  #uat-bar .wua-pop-over li a.wua-reject:hover {
124
- background-position: -9px -168px;
125
+ background-position: 0 -24px;
125
126
  }
126
127
 
127
128
  #uat-bar .wua-pop-over li a.wua-pivotal {
@@ -131,13 +132,13 @@
131
132
  display:block;
132
133
  width: 25px;
133
134
  height: 30px;
134
- background: url(http://conversant.com.au/whereuat/uat-bg.png) no-repeat -9px -301px;
135
+ background: url({{pt_uri}}) no-repeat 0 10px;
135
136
  font-size: 0.001em;
136
137
  text-indent: -20000em;
137
138
  }
138
139
 
139
140
  #uat-bar .wua-pop-over li a.wua-pivotal:hover {
140
- background-position: -9px -333px;
141
+ background-position: 0 -22px;
141
142
  }
142
143
 
143
144
 
@@ -147,8 +148,19 @@
147
148
  display:block;
148
149
  width: 60px;
149
150
  height: 25px;
150
- background: url(http://conversant.com.au/whereuat/uat-bg.png) no-repeat -1px -275px;
151
+ background: url({{btnreject_uri}}) no-repeat 0 0;
151
152
  font-size: 0.001em;
152
153
  text-indent: -20000em;
153
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
+
154
166
  }
@@ -0,0 +1,10 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title whereuat 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
+ = whereuat
@@ -2,8 +2,10 @@ require 'whereuat/configuration'
2
2
  require 'whereuat/rack_app'
3
3
  require 'whereuat/helpers'
4
4
  require 'whereuat/rails' if defined?(Rails)
5
+ require 'whereuat/assets'
5
6
 
6
7
  module Whereuat
8
+
7
9
  class << self
8
10
  attr_writer :configuration
9
11
 
@@ -20,11 +22,13 @@ module Whereuat
20
22
  end
21
23
 
22
24
  def assets_path
23
- Rails.root+'public/whereuat'
25
+ @assets_path ||= gem_root+'assets'
24
26
  end
25
27
 
26
28
  def gem_root
27
29
  @gem_root ||= Pathname('../..').expand_path(__FILE__)
28
30
  end
31
+
32
+ include Assets
29
33
  end
30
34
  end
@@ -0,0 +1,63 @@
1
+
2
+ module Whereuat
3
+ module Assets
4
+ class << self
5
+ def rebuild!
6
+ Whereuat.assets_path.mkpath
7
+
8
+ Whereuat.javascript_file.open('w') {|f| f << Whereuat.javascript}
9
+ Whereuat.css_file.open('w') {|f| f << Whereuat.css }
10
+ end
11
+ end
12
+
13
+ autoload :Image , 'whereuat/assets/image'
14
+ autoload :Context, 'whereuat/assets/context'
15
+
16
+ def template_ctx
17
+ Context.new
18
+ end
19
+
20
+ def mustache
21
+ @mustache ||= begin
22
+ require 'mustache'
23
+ Mustache
24
+ end
25
+ end
26
+
27
+ def javascript
28
+ mustache.render(javascript_template_file.read, Context.new)
29
+ end
30
+
31
+ def css
32
+ mustache.render(css_template_file.read, Context.new)
33
+ end
34
+
35
+ def dev_root
36
+ @dev_root ||= gem_root+'dev'
37
+ end
38
+
39
+ def javascript_template_file
40
+ @javascript_template_file ||= dev_root+'javascripts/whereuat.js.mustache'
41
+ end
42
+
43
+ def css_template_file
44
+ @css_template_file ||= dev_root+'stylesheets/whereuat.css.mustache'
45
+ end
46
+
47
+ def javascript_file
48
+ @javascript_file ||= assets_path+'whereuat.js'
49
+ end
50
+
51
+ def css_file
52
+ @css_file ||= assets_path+'whereuat.css'
53
+ end
54
+
55
+ def inline_javascript
56
+ javascript_file.exist? ? javascript_file.read : ''
57
+ end
58
+
59
+ def inline_css
60
+ css_file.exist? ? css_file.read : ''
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,28 @@
1
+ module Whereuat
2
+ module Assets
3
+ class Context
4
+
5
+ # bg becomes bg_uri. bg_uri yields a data uri of the image.
6
+ ImageMap = {
7
+ :bg => 'uat-bg.png',
8
+ :logo => 'uat-logo.gif',
9
+ :accept => 'accept.png',
10
+ :reject => 'reject.png',
11
+ :pt => 'pt.png',
12
+ :btnreject => 'btnreject.png',
13
+ :spinner => 'spinner.gif'
14
+ }
15
+
16
+ ImageMap.each do |k,v|
17
+ define_method("#{k}_uri") { Image.new( images_root + v ) }
18
+ end
19
+
20
+ protected
21
+
22
+ def images_root
23
+ @images_root ||= Whereuat.dev_root+'images'
24
+ end
25
+ end
26
+ end
27
+ end
28
+
@@ -0,0 +1,22 @@
1
+ module Whereuat
2
+ module Assets
3
+ class Image
4
+ def initialize(path)
5
+ @path = Pathname(path)
6
+ end
7
+
8
+ def to_s
9
+ "data:#{content_type};base64," + ([@path.read].pack("m").gsub("\n",''))
10
+ end
11
+
12
+ def content_type
13
+ case @path.to_s[/\.([^\.]+)$/,1]
14
+ when 'png'
15
+ 'image/png'
16
+ when 'gif'
17
+ 'image/gif'
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,32 +1,6 @@
1
1
  module Whereuat
2
-
3
2
  class Configuration
4
3
  attr_accessor :pivotal_tracker_token
5
4
  attr_accessor :pivotal_tracker_project
6
-
7
- attr_accessor :whereuat_stylesheet_url
8
- attr_accessor :whereuat_javascript_url
9
-
10
- def initialize
11
- if Whereuat.assets_path.directory?
12
- use_internal_resources!
13
- else
14
- use_github_resources!
15
- end
16
- end
17
-
18
- def use_github_resources!
19
- puts "using github resources"
20
- self.whereuat_stylesheet_url = "http://github.com/plus2/whereuat/raw/master/lib/whereuat/stylesheets/whereuat.css"
21
- self.whereuat_javascript_url = "http://github.com/plus2/whereuat/raw/master/lib/whereuat/javascript/whereuat.js"
22
- end
23
-
24
- def use_internal_resources!
25
- puts "using internal resources"
26
- self.whereuat_stylesheet_url = "/whereuat/whereuat.css"
27
- self.whereuat_javascript_url = "/whereuat/whereuat.js"
28
- end
29
- alias :use_dev_resources! :use_internal_resources!
30
5
  end
31
-
32
6
  end
@@ -1,8 +1,8 @@
1
1
  module Whereuat
2
2
  module Helpers
3
3
  def whereuat
4
- wua = "<script type='text/javascript'>var whereuat_stylesheet_url=#{Whereuat.configuration.whereuat_stylesheet_url.to_json};</script>" +
5
- "<script type='text/javascript' src='#{Whereuat.configuration.whereuat_javascript_url}'></script>"
4
+ wua = "<style type='text/css'>#{Whereuat.inline_css}</style>" +
5
+ "<script type='text/javascript'>#{Whereuat.inline_javascript}</script>"
6
6
 
7
7
  wua.respond_to?(:html_safe) ? wua.html_safe : wua
8
8
  end
@@ -6,7 +6,6 @@
6
6
  %a.wua-accept{:href => "#accept", :title => "accept"} accept
7
7
  %a.wua-reject{:href => "#reject", :title => "reject"} reject
8
8
  %a.wua-pivotal{:href => story.url, :title => "View in Pivotal Tracker"} View in Pivotal Tracker
9
- %img.wua-hide.wua-spinner(src="http://conversant.com.au/whereuat/spinner.gif")
10
9
  %span.wua-story= story.name
11
10
  %span.wua-story-id.wua-hide= story.id
12
11
  %form.wua-hide
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{whereuat}
8
- s.version = "0.0.13"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Askins", "Lachie Cox", "Ben Webster"]
@@ -19,24 +19,38 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".gitignore",
22
+ "Gemfile",
23
+ "Gemfile.lock",
22
24
  "LICENSE",
23
25
  "README.md",
24
26
  "Rakefile",
25
27
  "VERSION",
28
+ "assets/whereuat.css",
29
+ "assets/whereuat.js",
30
+ "dev/dev.rb",
31
+ "dev/images/accept.png",
32
+ "dev/images/bg-uat.gif",
33
+ "dev/images/btnreject.png",
34
+ "dev/images/pt.png",
35
+ "dev/images/reject.png",
36
+ "dev/images/spinner.gif",
37
+ "dev/images/uat-bg.png",
38
+ "dev/images/uat-logo.gif",
39
+ "dev/images/whereuat-close.png",
40
+ "dev/images/whereuat-open.png",
41
+ "dev/images/whereuat.png",
42
+ "dev/javascripts/whereuat.js.mustache",
43
+ "dev/stylesheets/whereuat.css.mustache",
44
+ "dev/views/index.haml",
26
45
  "lib/whereuat.rb",
46
+ "lib/whereuat/assets.rb",
47
+ "lib/whereuat/assets/context.rb",
48
+ "lib/whereuat/assets/image.rb",
27
49
  "lib/whereuat/configuration.rb",
28
50
  "lib/whereuat/helpers.rb",
29
- "lib/whereuat/javascript/whereuat.js",
30
51
  "lib/whereuat/rack_app.rb",
31
52
  "lib/whereuat/rails.rb",
32
53
  "lib/whereuat/railtie.rb",
33
- "lib/whereuat/stylesheets/bg-uat.gif",
34
- "lib/whereuat/stylesheets/spinner.gif",
35
- "lib/whereuat/stylesheets/uat-bg.png",
36
- "lib/whereuat/stylesheets/whereuat-close.png",
37
- "lib/whereuat/stylesheets/whereuat-open.png",
38
- "lib/whereuat/stylesheets/whereuat.css",
39
- "lib/whereuat/stylesheets/whereuat.png",
40
54
  "lib/whereuat/tasks.rb",
41
55
  "lib/whereuat/templates/index.haml",
42
56
  "whereuat.gemspec"
@@ -44,14 +58,14 @@ Gem::Specification.new do |s|
44
58
  s.homepage = %q{http://github.com/plus2/whereuat}
45
59
  s.rdoc_options = ["--charset=UTF-8"]
46
60
  s.require_paths = ["lib"]
47
- s.rubygems_version = %q{1.3.7}
61
+ s.rubygems_version = %q{1.3.6}
48
62
  s.summary = %q{Direct your clients to test delivered features}
49
63
 
50
64
  if s.respond_to? :specification_version then
51
65
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
66
  s.specification_version = 3
53
67
 
54
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
68
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
69
  s.add_runtime_dependency(%q<pivotal-tracker>, [">= 0.1.3"])
56
70
  s.add_runtime_dependency(%q<haml>, [">= 2.2.0"])
57
71
  s.add_runtime_dependency(%q<rack>, [">= 1.0.0"])
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whereuat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
7
+ - 1
8
8
  - 0
9
- - 13
10
- version: 0.0.13
9
+ version: 0.1.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Ben Askins
@@ -24,11 +23,9 @@ dependencies:
24
23
  name: pivotal-tracker
25
24
  prerelease: false
26
25
  requirement: &id001 !ruby/object:Gem::Requirement
27
- none: false
28
26
  requirements:
29
27
  - - ">="
30
28
  - !ruby/object:Gem::Version
31
- hash: 29
32
29
  segments:
33
30
  - 0
34
31
  - 1
@@ -40,11 +37,9 @@ dependencies:
40
37
  name: haml
41
38
  prerelease: false
42
39
  requirement: &id002 !ruby/object:Gem::Requirement
43
- none: false
44
40
  requirements:
45
41
  - - ">="
46
42
  - !ruby/object:Gem::Version
47
- hash: 7
48
43
  segments:
49
44
  - 2
50
45
  - 2
@@ -56,11 +51,9 @@ dependencies:
56
51
  name: rack
57
52
  prerelease: false
58
53
  requirement: &id003 !ruby/object:Gem::Requirement
59
- none: false
60
54
  requirements:
61
55
  - - ">="
62
56
  - !ruby/object:Gem::Version
63
- hash: 23
64
57
  segments:
65
58
  - 1
66
59
  - 0
@@ -80,24 +73,38 @@ extra_rdoc_files:
80
73
  files:
81
74
  - .document
82
75
  - .gitignore
76
+ - Gemfile
77
+ - Gemfile.lock
83
78
  - LICENSE
84
79
  - README.md
85
80
  - Rakefile
86
81
  - VERSION
82
+ - assets/whereuat.css
83
+ - assets/whereuat.js
84
+ - dev/dev.rb
85
+ - dev/images/accept.png
86
+ - dev/images/bg-uat.gif
87
+ - dev/images/btnreject.png
88
+ - dev/images/pt.png
89
+ - dev/images/reject.png
90
+ - dev/images/spinner.gif
91
+ - dev/images/uat-bg.png
92
+ - dev/images/uat-logo.gif
93
+ - dev/images/whereuat-close.png
94
+ - dev/images/whereuat-open.png
95
+ - dev/images/whereuat.png
96
+ - dev/javascripts/whereuat.js.mustache
97
+ - dev/stylesheets/whereuat.css.mustache
98
+ - dev/views/index.haml
87
99
  - lib/whereuat.rb
100
+ - lib/whereuat/assets.rb
101
+ - lib/whereuat/assets/context.rb
102
+ - lib/whereuat/assets/image.rb
88
103
  - lib/whereuat/configuration.rb
89
104
  - lib/whereuat/helpers.rb
90
- - lib/whereuat/javascript/whereuat.js
91
105
  - lib/whereuat/rack_app.rb
92
106
  - lib/whereuat/rails.rb
93
107
  - lib/whereuat/railtie.rb
94
- - lib/whereuat/stylesheets/bg-uat.gif
95
- - lib/whereuat/stylesheets/spinner.gif
96
- - lib/whereuat/stylesheets/uat-bg.png
97
- - lib/whereuat/stylesheets/whereuat-close.png
98
- - lib/whereuat/stylesheets/whereuat-open.png
99
- - lib/whereuat/stylesheets/whereuat.css
100
- - lib/whereuat/stylesheets/whereuat.png
101
108
  - lib/whereuat/tasks.rb
102
109
  - lib/whereuat/templates/index.haml
103
110
  - whereuat.gemspec
@@ -111,27 +118,23 @@ rdoc_options:
111
118
  require_paths:
112
119
  - lib
113
120
  required_ruby_version: !ruby/object:Gem::Requirement
114
- none: false
115
121
  requirements:
116
122
  - - ">="
117
123
  - !ruby/object:Gem::Version
118
- hash: 3
119
124
  segments:
120
125
  - 0
121
126
  version: "0"
122
127
  required_rubygems_version: !ruby/object:Gem::Requirement
123
- none: false
124
128
  requirements:
125
129
  - - ">="
126
130
  - !ruby/object:Gem::Version
127
- hash: 3
128
131
  segments:
129
132
  - 0
130
133
  version: "0"
131
134
  requirements: []
132
135
 
133
136
  rubyforge_project:
134
- rubygems_version: 1.3.7
137
+ rubygems_version: 1.3.6
135
138
  signing_key:
136
139
  specification_version: 3
137
140
  summary: Direct your clients to test delivered features