spree_news 0.0.3 → 0.0.4

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
@@ -10,4 +10,6 @@ else
10
10
  gem "ruby-debug19"
11
11
  end
12
12
 
13
+ gem 'haml'
14
+
13
15
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_news (0.0.1)
4
+ spree_news (0.0.3)
5
5
  haml
6
6
  spree_core (~> 1.0.0)
7
7
 
@@ -1,3 +1,8 @@
1
1
  /*
2
2
  *= require admin/spree_core
3
3
  */
4
+
5
+ .new-post {
6
+ margin-bottom: 10px;
7
+ float: right;
8
+ }
@@ -3,21 +3,22 @@
3
3
  // You can use Sass (SCSS) here: http://sass-lang.com/
4
4
 
5
5
  .news-ticker {
6
- background: #D3D5BA;
7
- width: 290px;
8
- float: right;
9
- margin: 10px 8px 10px 10px;
6
+ h3 {
7
+ color: #00ADEE;
8
+ }
9
+ background: white;
10
+ margin: 10px 10px 10px 10px;
10
11
  padding: 10px 10px 10px 10px;
11
12
  }
12
13
 
13
14
  #news-container {
14
- border: 1px solid #333333;
15
+ margin-top: -15px;
16
+ border: 1px solid #aaaaaa;
15
17
  }
16
18
 
17
19
  #news-container ul li div {
18
- border: 1px solid #aaaaaa;
19
- height: 75px;
20
- width: 280px;
21
- background: #EEE7DF;
20
+ min-height: 75px;
21
+ background: white;
22
22
  padding: 5px 5px 5px 5px;
23
23
  }
24
+
@@ -41,8 +41,10 @@ class Spree::Admin::PostsController < Spree::Admin::ResourceController
41
41
  def destroy
42
42
  @post = Spree::Post.find(params[:id])
43
43
  if @post.destroy
44
+ flash[:notice] = "Post deleted successfully"
44
45
  redirect_to admin_posts_path
45
46
  else
47
+ flash[:alert] = "Error deleting post"
46
48
  redirect_to :back
47
49
  end
48
50
  end
@@ -1,6 +1,6 @@
1
1
  class Spree::Post < ActiveRecord::Base
2
2
  validates_presence_of :description
3
- validates_length_of :description, :maximum => 150
3
+ # validates_length_of :description, :maximum => 150
4
4
 
5
5
  scope :published, lambda { where(:published => true) }
6
6
  end
@@ -1,8 +1,6 @@
1
1
  - if Spree::Post.all.any?
2
2
  .news-ticker
3
- %center
4
- %u
5
- %h3 Latest News
3
+ %h3 Latest News
6
4
  %p
7
5
  #news-container
8
6
  %ul
@@ -10,7 +8,7 @@
10
8
  %li
11
9
  %div
12
10
  %h6= post.created_at.strftime("%B %d, %Y")
13
- =h truncate(post.description, :length => 150)
11
+ = post.description
14
12
 
15
13
  :javascript
16
14
  $(function(){
@@ -19,6 +17,6 @@
19
17
  pause: 4000,
20
18
  animation: 'fade',
21
19
  mousePause: true,
22
- showItems: 3
20
+ showItems: 1
23
21
  });
24
22
  });
data/spree_news.gemspec CHANGED
@@ -2,14 +2,14 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_news'
5
- s.version = '0.0.3'
5
+ s.version = '0.0.4'
6
6
  s.summary = 'Adds a Javascript enabled scrolling news feed ticker wherever you call it'
7
- s.description = s.summary
7
+ s.description = 'Provides an Admin view to create/edit posts which will be shown on the home page in a scrolling news ticker window below the products listing.'
8
8
  s.required_ruby_version = '>= 1.9.2'
9
9
 
10
10
  s.author = 'JD Warren'
11
11
  s.email = 'jd@isotope11.com'
12
- s.homepage = 'http://www.isotope11.com'
12
+ s.homepage = 'http://github.com/johndavid400/spree_news'
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
17
17
  s.requirements << 'none'
18
18
 
19
19
  s.add_dependency 'spree_core', '~> 1.0.0'
20
- s.add_dependency 'haml'
20
+ s.add_dependency 'haml', '~> 3.1.4'
21
21
 
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_news
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -32,19 +32,19 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: 3.1.4
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
46
- description: Adds a Javascript enabled scrolling news feed ticker wherever you call
47
- it
45
+ version: 3.1.4
46
+ description: Provides an Admin view to create/edit posts which will be shown on the
47
+ home page in a scrolling news ticker window below the products listing.
48
48
  email: jd@isotope11.com
49
49
  executables: []
50
50
  extensions: []
@@ -87,7 +87,7 @@ files:
87
87
  - test/functional/posts_controller_test.rb
88
88
  - test/unit/helpers/posts_helper_test.rb
89
89
  - test/unit/post_test.rb
90
- homepage: http://www.isotope11.com
90
+ homepage: http://github.com/johndavid400/spree_news
91
91
  licenses: []
92
92
  post_install_message:
93
93
  rdoc_options: []