crowdblog 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +5 -1
- data/README.md +3 -0
- data/app/assets/javascripts/crowdblog/templates/posts/post.jst.eco.slim +1 -1
- data/app/models/crowdblog/post.rb +1 -1
- data/db/migrate/20120229160314_add_review_fields_to_post.rb +6 -0
- data/features/posts/listing.feature +16 -0
- data/features/posts/manage.feature +1 -1
- data/features/step_definitions/global_steps.rb +4 -0
- data/features/step_definitions/review_steps.rb +27 -0
- data/lib/crowdblog/version.rb +1 -1
- data/spec/dummy/db/schema.rb +5 -3
- metadata +7 -4
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ GIT
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
crowdblog (0.0.
|
12
|
+
crowdblog (0.0.16)
|
13
13
|
backbone-rails
|
14
14
|
carrierwave
|
15
15
|
devise
|
@@ -53,6 +53,7 @@ GEM
|
|
53
53
|
activesupport (3.2.2)
|
54
54
|
i18n (~> 0.6)
|
55
55
|
multi_json (~> 1.0)
|
56
|
+
addressable (2.3.2)
|
56
57
|
arel (3.0.2)
|
57
58
|
backbone-rails (0.9.1)
|
58
59
|
rails (>= 3.0.0)
|
@@ -130,6 +131,8 @@ GEM
|
|
130
131
|
railties (>= 3.2.0, < 5.0)
|
131
132
|
thor (~> 0.14)
|
132
133
|
json (1.6.6)
|
134
|
+
launchy (2.1.2)
|
135
|
+
addressable (~> 2.3)
|
133
136
|
less (2.0.12)
|
134
137
|
commonjs (~> 0.2.0)
|
135
138
|
therubyracer (~> 0.9.9)
|
@@ -261,6 +264,7 @@ DEPENDENCIES
|
|
261
264
|
gravtastic
|
262
265
|
headless
|
263
266
|
jquery-rails
|
267
|
+
launchy
|
264
268
|
less-rails-bootstrap
|
265
269
|
rake
|
266
270
|
redcarpet
|
data/README.md
CHANGED
@@ -4,4 +4,7 @@ CrowdBlog
|
|
4
4
|
CI:
|
5
5
|
[![Build Status](https://secure.travis-ci.org/crowdint/crowdblog.png?branch=master)](http://travis-ci.org/crowdint/crowdblog)
|
6
6
|
|
7
|
+
Code Climate:
|
8
|
+
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/crowdint/crowdblog)
|
9
|
+
|
7
10
|
**This project rocks!**
|
@@ -41,7 +41,7 @@ module Crowdblog
|
|
41
41
|
class << self
|
42
42
|
def all_posts_json
|
43
43
|
includes(:author).
|
44
|
-
order_by_publish_date.to_json only: [:id, :title, :state, :published_at],
|
44
|
+
order_by_publish_date.to_json only: [:id, :title, :state, :published_at, :ready_for_review],
|
45
45
|
methods: [:author_email, :published?]
|
46
46
|
end
|
47
47
|
|
@@ -14,3 +14,19 @@ Feature: Posts Listing
|
|
14
14
|
Scenario: Publishers can see all Posts
|
15
15
|
When I am signed in as Publisher User
|
16
16
|
Then I should see Posts for all Users
|
17
|
+
|
18
|
+
Scenario: Mark a post for review
|
19
|
+
Given I am signed in as Test User
|
20
|
+
When I mark the Test post for review
|
21
|
+
Then the Test post should be marked for review
|
22
|
+
|
23
|
+
Scenario: A post marked for review
|
24
|
+
Given the Test Post is marked for Review
|
25
|
+
When I am signed in as Test User
|
26
|
+
Then the Test post should be marked for review
|
27
|
+
|
28
|
+
Scenario: Unmark a post marked for review
|
29
|
+
Given the Test Post is marked for Review
|
30
|
+
When I am signed in as Test User
|
31
|
+
When I unmark the Test post for review
|
32
|
+
Then the Test post should not be marked for review
|
@@ -0,0 +1,27 @@
|
|
1
|
+
When /^I (un)?mark the Test post for review$/ do |negation|
|
2
|
+
within "#post-#{@post.id}" do
|
3
|
+
click_link "Review"
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
Then /^the Test post should be marked for review$/ do
|
8
|
+
within "#post-#{@post.id}" do
|
9
|
+
link = find_link('Review')
|
10
|
+
link[:class].should =~ /btn-warning/
|
11
|
+
end
|
12
|
+
@post.reload
|
13
|
+
@post.ready_for_review.should be_true
|
14
|
+
end
|
15
|
+
|
16
|
+
Then /^the Test post should not be marked for review$/ do
|
17
|
+
within "#post-#{@post.id}" do
|
18
|
+
link = find_link('Review')
|
19
|
+
link[:class].should_not =~ /btn-warning/
|
20
|
+
end
|
21
|
+
@post.reload
|
22
|
+
@post.ready_for_review.should be_false
|
23
|
+
end
|
24
|
+
|
25
|
+
Given /^the Test Post is marked for Review$/ do
|
26
|
+
@post.update_attribute :ready_for_review, true
|
27
|
+
end
|
data/lib/crowdblog/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20120229160314) do
|
15
15
|
|
16
16
|
create_table "assets", :force => true do |t|
|
17
17
|
t.integer "post_id"
|
@@ -25,11 +25,13 @@ ActiveRecord::Schema.define(:version => 20120220033923) do
|
|
25
25
|
t.text "body"
|
26
26
|
t.string "permalink"
|
27
27
|
t.date "published_at"
|
28
|
-
t.datetime "created_at",
|
29
|
-
t.datetime "updated_at",
|
28
|
+
t.datetime "created_at", :null => false
|
29
|
+
t.datetime "updated_at", :null => false
|
30
30
|
t.integer "author_id"
|
31
31
|
t.string "state"
|
32
32
|
t.integer "publisher_id"
|
33
|
+
t.boolean "ready_for_review"
|
34
|
+
t.datetime "marked_for_review_at"
|
33
35
|
end
|
34
36
|
|
35
37
|
create_table "users", :force => true do |t|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowdblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2012-
|
16
|
+
date: 2012-08-30 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: rails
|
@@ -477,12 +477,14 @@ files:
|
|
477
477
|
- db/migrate/20120219071614_create_assets.rb
|
478
478
|
- db/migrate/20120219234253_add_alias_to_users.rb
|
479
479
|
- db/migrate/20120220033923_create_vestal_versions.rb
|
480
|
+
- db/migrate/20120229160314_add_review_fields_to_post.rb
|
480
481
|
- features/posts/listing.feature
|
481
482
|
- features/posts/manage.feature
|
482
483
|
- features/posts/publish.feature
|
483
484
|
- features/step_definitions/global_steps.rb
|
484
485
|
- features/step_definitions/navigation_steps.rb
|
485
486
|
- features/step_definitions/posts_steps.rb
|
487
|
+
- features/step_definitions/review_steps.rb
|
486
488
|
- features/support/env.rb
|
487
489
|
- lib/crowdblog.rb
|
488
490
|
- lib/crowdblog/engine.rb
|
@@ -559,7 +561,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
559
561
|
version: '0'
|
560
562
|
segments:
|
561
563
|
- 0
|
562
|
-
hash:
|
564
|
+
hash: -3137263056640920855
|
563
565
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
564
566
|
none: false
|
565
567
|
requirements:
|
@@ -568,7 +570,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
568
570
|
version: '0'
|
569
571
|
segments:
|
570
572
|
- 0
|
571
|
-
hash:
|
573
|
+
hash: -3137263056640920855
|
572
574
|
requirements: []
|
573
575
|
rubyforge_project:
|
574
576
|
rubygems_version: 1.8.23
|
@@ -582,6 +584,7 @@ test_files:
|
|
582
584
|
- features/step_definitions/global_steps.rb
|
583
585
|
- features/step_definitions/navigation_steps.rb
|
584
586
|
- features/step_definitions/posts_steps.rb
|
587
|
+
- features/step_definitions/review_steps.rb
|
585
588
|
- features/support/env.rb
|
586
589
|
- spec/dummy/.rvmrc
|
587
590
|
- spec/dummy/README.rdoc
|