crowdblog 0.0.15 → 0.0.16

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/Gemfile CHANGED
@@ -26,6 +26,7 @@ end
26
26
 
27
27
  group :development, :test do
28
28
  gem 'rake' # needed for Travis CI: http://bit.ly/xEgH8j
29
+ gem 'launchy'
29
30
  end
30
31
 
31
32
  # Declare any dependencies that are still in development here instead of in
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- crowdblog (0.0.15)
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!**
@@ -11,4 +11,4 @@ td.span1
11
11
  td.span1
12
12
  a.btn.delete.span1 href="#" Delete
13
13
  td.span1
14
- a.btn.edit.span1 href="#edit/<%= @post.id %>" Edit
14
+ a.btn.edit.span1 href="#edit/<%= @post.id %>" Edit
@@ -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
 
@@ -0,0 +1,6 @@
1
+ class AddReviewFieldsToPost < ActiveRecord::Migration
2
+ def change
3
+ add_column :posts, :ready_for_review, :boolean
4
+ add_column :posts, :marked_for_review_at, :datetime
5
+ end
6
+ end
@@ -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
@@ -33,4 +33,4 @@ Feature: Manage Posts
33
33
  Scenario: Post Preview
34
34
  Given I am on the New Post page
35
35
  When I type in the post body field
36
- Then I should see its markdown preview
36
+ Then I should see its markdown preview
@@ -17,3 +17,7 @@ Given /^(?:|the )Publisher User exists$/ do
17
17
  @current_user = Fabricate(:user_publisher) unless @current_user
18
18
  @publisher_user = @current_user
19
19
  end
20
+
21
+ Then /^show me the page$/ do
22
+ save_and_open_page
23
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Crowdblog
2
- VERSION = '0.0.15'
2
+ VERSION = '0.0.16'
3
3
  end
@@ -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 => 20120220033923) do
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", :null => false
29
- t.datetime "updated_at", :null => false
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.15
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-05-28 00:00:00.000000000 Z
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: 947042220405031422
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: 947042220405031422
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