mhc 1.0.2 → 1.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34a48d614b4a6e0220229290fac2b1869ac9d13e
4
- data.tar.gz: 7a7c506a0f979101ecf738f4e2e3718e584865d5
3
+ metadata.gz: c96c8be0a9d697380b98effb30cb85bf489af611
4
+ data.tar.gz: 76549b9fb166f1d034923456901740a25126efef
5
5
  SHA512:
6
- metadata.gz: e9352dbfedb19d01efa8d990bba145fb983a0174a51d945103484b4d2c89861402f7f54c0732ac862f2f6194c719a11f51c308aaf56487d70bdac4e2d3cf58a9
7
- data.tar.gz: 39cf7f61f051a8627089b3c4a67ad8ae4f1e21f4a0178a0e5e13f46ff3f0b9122e285652ada768b0bc410b81235a38f9528d3e9e7b1c0b13c67de1dac0064e0a
6
+ metadata.gz: 4e913eca6be7cf2b0a69515ab986767293a4283053410111d6fb2128b1b2dbe1c14a43f106fff29611dc67c6c24673003684f136f06a13209916926ecf3d0ef0
7
+ data.tar.gz: b07087fce50e126f637a5b3942b0e6cadc1b7d4b5111d111d251f29c88e52bf6f05bafb3606f52cbc3492023afb66d28a6fc3aac190d2d6b24915d235015dace
data/Rakefile CHANGED
@@ -11,3 +11,19 @@ Rake::RDocTask.new do |rd|
11
11
  rd.rdoc_files = FileList["lib/**/*.rb"]
12
12
  rd.options << '-charset=UTF-8'
13
13
  end
14
+
15
+ task :release => :check_version
16
+ task :build => :check_version
17
+
18
+ # Emacs stuffs must have the same version numbers
19
+ # with Mhc::VERSION.
20
+ task :check_version do
21
+ for file in %w(mhc-vars.el Cask)
22
+ path = File.expand_path("../emacs/#{file}", __FILE__)
23
+ raise "File not found #{path}" unless File.exists?(path)
24
+
25
+ if /(\d+\.\d+\.\d+).*MHC_VERSION/ !~ File.open(path).read || Mhc::VERSION != $1
26
+ raise "#{path} does not have valid version number (#{$1})."
27
+ end
28
+ end
29
+ end
data/emacs/Cask CHANGED
@@ -5,8 +5,7 @@
5
5
  (source org)
6
6
  (source melpa)
7
7
 
8
- (package "mhc"
9
- "1.0.0" "Message Harmonized Calendaring system")
8
+ (package "mhc" "1.0.3" "Message Harmonized Calendaring system") ;; MHC_VERSION
10
9
 
11
10
  (files "mhc.el" "mhc-*.el")
12
11
 
@@ -1530,7 +1530,8 @@ The keys that are defined for mhc-calendar-mode are:
1530
1530
  mhc-calendar/hnf-ignore-categories))
1531
1531
  (setq lst (cdr lst))))
1532
1532
  (with-temp-buffer
1533
- (insert-file-contents mhcfile)
1533
+ (insert-file-contents-as-coding-system
1534
+ mhc-default-coding-system mhcfile)
1534
1535
  (mhc-header-decode-ewords)
1535
1536
  (mhc-header-narrowing
1536
1537
  (setq cats (mhc-header-get-value "x-sc-category"))
@@ -113,7 +113,8 @@
113
113
  (if schedule
114
114
  (cfw:details-popup
115
115
  (with-temp-buffer
116
- (insert-file-contents
116
+ (insert-file-contents-as-coding-system
117
+ mhc-default-coding-system
117
118
  (mhc-record-name (mhc-schedule-record schedule)))
118
119
  (mhc-calendar/view-file-decode-header)
119
120
  (buffer-string)
@@ -101,7 +101,8 @@ If optional argument ORIGINAL is non-nil, BUFFER is raw buffer."
101
101
  (defsubst mhc-draft-reedit-file (filename)
102
102
  "Restore contents of file FILENAME as draft in the current buffer."
103
103
  (erase-buffer)
104
- (insert-file-contents filename)
104
+ (mhc-insert-file-contents-as-coding-system
105
+ mhc-default-coding-system filename)
105
106
  (mhc-draft-reedit-buffer (current-buffer) 'original))
106
107
 
107
108
 
@@ -17,7 +17,7 @@
17
17
 
18
18
 
19
19
  ;;; Constants:
20
- (defconst mhc-version "mhc 1.0.0")
20
+ (defconst mhc-version "mhc 1.0.3") ;; MHC_VERSION
21
21
 
22
22
 
23
23
  ;;; Configration Variables:
@@ -95,13 +95,7 @@
95
95
  ["Reset" mhc-reset (mhc-summary-buffer-p)]
96
96
  ("Network"
97
97
  ["Online" mhc-file-toggle-offline mhc-file/offline]
98
- ["Offline" mhc-file-toggle-offline (not mhc-file/offline)]
99
- ["Sync" mhc-file-sync (and (not (and mhc-file/offline
100
- (not mhc-file-sync-enable-offline)))
101
- (if (eq mhc-file-method 'mhc-sync)
102
- (and (stringp mhc-sync-remote)
103
- (stringp mhc-sync-id))
104
- mhc-file-method))])
98
+ ["Offline" mhc-file-toggle-offline (not mhc-file/offline)])
105
99
  "----"
106
100
  ("PostScript"
107
101
  ["PostScript" mhc-ps t]
@@ -138,7 +132,6 @@
138
132
  (define-key mhc-prefix-map "?" 'mhc-calendar)
139
133
  (define-key mhc-prefix-map "t" 'mhc-calendar-toggle-insert-rectangle)
140
134
  (define-key mhc-prefix-map "T" 'mhc-file-toggle-offline)
141
- (define-key mhc-prefix-map "S" 'mhc-file-sync)
142
135
  (define-key mhc-prefix-map "R" 'mhc-reset)
143
136
  (define-key mhc-mode-map mhc-prefix-key mhc-prefix-map)
144
137
  (cond
@@ -878,7 +871,8 @@ the default action of this command is changed to the latter."
878
871
  (record (mhc-summary-record)))
879
872
  (if (and (stringp file) (file-exists-p file))
880
873
  (with-temp-buffer
881
- (insert-file-contents file)
874
+ (mhc-insert-file-contents-as-coding-system
875
+ mhc-default-coding-system file)
882
876
  (mhc-header-decode-ewords)
883
877
  (mhc-draft-store-template
884
878
  (buffer-substring-no-properties (point-min) (point-max)))
@@ -901,7 +895,8 @@ the default action of this command is changed to the latter."
901
895
  (let ((filename (mhc-summary-filename))
902
896
  url)
903
897
  (with-temp-buffer
904
- (insert-file-contents filename)
898
+ (mhc-insert-file-contents-as-coding-system
899
+ mhc-default-coding-system filename)
905
900
  (if (setq url (mhc-header-narrowing
906
901
  (or (mhc-header-get-value "x-uri")
907
902
  (mhc-header-get-value "x-url"))))
@@ -1,4 +1,4 @@
1
1
  module Mhc
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  PRODID = "-//Quickhack.net//MHC #{Mhc::VERSION}//EN"
4
4
  end
@@ -19,7 +19,7 @@ module Mhc
19
19
  @top_directory = uri.path
20
20
  @http = Net::HTTP.new(uri.host, uri.port, proxy_host, proxy_port)
21
21
  @http.use_ssl = true if uri.scheme == "https"
22
- @http.verify_mode = OpenSSL::SSL::VERIFY_NONE
22
+ @http.verify_mode = OpenSSL::SSL::VERIFY_PEER
23
23
  end
24
24
 
25
25
  def set_basic_auth(user, password)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mhc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshinari Nomura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-04 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor