enju_message 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- Copyright 2011 YOURNAME
1
+ Copyright 2012 Kosuke Tanabe
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -34,3 +34,14 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
34
34
  end
35
35
 
36
36
  task :default => :spec
37
+ require 'rake/testtask'
38
+
39
+ Rake::TestTask.new(:test) do |t|
40
+ t.libs << 'lib'
41
+ t.libs << 'test'
42
+ t.pattern = 'test/**/*_test.rb'
43
+ t.verbose = false
44
+ end
45
+
46
+
47
+ task :default => :test
@@ -33,7 +33,7 @@ class MessagesController < ApplicationController
33
33
  @messages = search.execute!.results
34
34
 
35
35
  respond_to do |format|
36
- format.html # index.rhtml
36
+ format.html # index.html.erb
37
37
  format.json { render :json => @messages }
38
38
  format.rss
39
39
  format.atom
@@ -47,7 +47,7 @@ class MessagesController < ApplicationController
47
47
  @message.sm_read!
48
48
 
49
49
  respond_to do |format|
50
- format.html # show.rhtml
50
+ format.html # show.html.erb
51
51
  format.json { render :json => @message }
52
52
  end
53
53
  end
@@ -83,8 +83,7 @@ class MessagesController < ApplicationController
83
83
 
84
84
  respond_to do |format|
85
85
  if @message.save
86
- flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.message'))
87
- format.html { redirect_to messages_url }
86
+ format.html { redirect_to messages_url, :notice => t('controller.successfully_created', :model => t('activerecord.models.message')) }
88
87
  format.json { render :json => @message, :status => :created, :location => @message }
89
88
  else
90
89
  format.html { render :action => "new" }
@@ -99,8 +98,7 @@ class MessagesController < ApplicationController
99
98
  @message = current_user.received_messages.find(params[:id])
100
99
 
101
100
  if @message.update_attributes(params[:message])
102
- flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.message'))
103
- format.html { redirect_to @message }
101
+ format.html { redirect_to @message, :notice => t('controller.successfully_updated', :model => t('activerecord.models.message')) }
104
102
  format.json { head :no_content }
105
103
  else
106
104
  format.html { render :action => "edit" }
@@ -1,3 +1,3 @@
1
1
  module EnjuMessage
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-30 00:00:00.000000000 Z
12
+ date: 2012-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails