appoxy_sessions 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sessions/shareable.rb +10 -10
  2. metadata +1 -1
@@ -33,7 +33,7 @@ module Appoxy
33
33
  # check if exists
34
34
  share_domain = self.share_domain
35
35
  item_id_name = self.item_id_name
36
- puts 'share_domain = ' + share_domain.inspect
36
+ # puts 'share_domain = ' + share_domain.inspect
37
37
  @sdb = SimpleRecord::Base.connection
38
38
  # @shared_with = share_class.find(:first, :conditions=>["user_id = ? and item_id = ?", user.id, @item.id])
39
39
  @project_user = get_results(:first, ["select * from #{share_domain} where user_id=? and #{item_id_name} = ?", user.id, self.id])
@@ -48,8 +48,8 @@ module Appoxy
48
48
  id = share_id(user)
49
49
  @sdb.put_attributes(share_domain, id, {:new_share=>true,
50
50
  :id=>id,
51
- :created=>now,
52
- :updated=>now,
51
+ :created=>SimpleRecord::Translations.pad_and_offset(now),
52
+ :updated=>SimpleRecord::Translations.pad_and_offset(now),
53
53
  :user_id => user.id,
54
54
  item_id_name => self.id }.merge(access_rights), true)
55
55
 
@@ -94,14 +94,14 @@ module Appoxy
94
94
  def unshare_by_id(id)
95
95
  # @project_user = ProjectUser.find(params[:pu_id])
96
96
  # @project_user.delete
97
- puts 'unsharing ' + id.to_s
97
+ # puts 'unsharing ' + id.to_s
98
98
  @sdb = SimpleRecord::Base.connection
99
- puts "response=" + @sdb.delete_attributes(share_domain, id.to_s).inspect
100
- puts 'deleted?'
99
+ # puts "response=" + @sdb.delete_attributes(share_domain, id.to_s).inspect
100
+ # puts 'deleted?'
101
101
  end
102
102
 
103
103
  def update_sharing_options(user, options={})
104
- puts 'options=' + ({ :updated=>Time.now }.merge(options)).inspect
104
+ # puts 'options=' + ({ :updated=>Time.now }.merge(options)).inspect
105
105
  @sdb = SimpleRecord::Base.connection
106
106
  @project_user = get_results(:first, ["select * from #{share_domain} where user_id=? and #{item_id_name} = ?", user.id, self.id])
107
107
  # compare values
@@ -124,11 +124,11 @@ module Appoxy
124
124
  end
125
125
 
126
126
  def share_domain
127
- puts 'instance share_domain'
127
+ # puts 'instance share_domain'
128
128
  ret = self.class.name + "User"
129
- puts 'SHARE_NAME=' + ret
129
+ # puts 'SHARE_NAME=' + ret
130
130
  ret = ret.tableize
131
- puts 'ret=' + ret
131
+ # puts 'ret=' + ret
132
132
  ret
133
133
  end
134
134
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appoxy_sessions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder